4
I try to do a automatic backup of our Avocent Console server.
Content of backup.cmd
:
putty.exe -ssh root@acs01.NULL.local -pw secretpw -m acs01.txt
Content of acs01.txt
:
cli
cd system_tools/
save_configuration
set ip_address=10.0.0.1
set path_and_filename=/avocent/acs01
set username=ftpacs01
set password=anothersecretpw
save
finish
exit
exit
All works fine, but I have one problem. PuTTY comes only to execute the command cli
, all other commands are not executed.
Is it possible to do a short break after each command?
Or is it because the cli
is a separate interface in the Avocent?
Thank you
What system is the SSH server on? I'm presuming Windows. If so, what's the CLI command directed at? – Jared Allard – 2015-08-25T19:56:11.150
1If you're saying that the
cli
command starts its own pseudo-shell, then yes, this is the problem. The real shell is likely waiting for thecli
processes to complete before continuing with the other commands. If you were to exit thecli
application it would probably run the other commands. – heavyd – 2015-08-25T20:06:54.4902What kind of system is this. What is the cli command. If this is bash, you should not need to put delays in between the commands. – Aaron – 2015-08-25T19:39:37.747
@heavyd any idea what his cli program is? – barlop – 2015-08-25T20:55:07.823
Looks like an Avocent Command Line Configuration Utility
– heavyd – 2015-08-25T20:58:06.310@heavyd When you say a pseudo-shell, is that just a program that reads from stdin? – barlop – 2015-08-25T21:10:54.273
@barlop, really I just mean an application that acts like a shell, giving you a command prompt, and accepting a limited set of commands, but its probably not as full featured as a shell like bash. – heavyd – 2015-08-25T21:13:56.140
@heavyd I have heard that ssh -T can make a difference between pseudo terminal allocation or not..(-t is forced pseudo terminal, -T is no pseudo terminal) Though when I do ssh -T 127.0.0.1 I get prompted for a password and also without it.. Are you aware of pseudo terminal being toggled in relation to ssh ? (in terms of.. then showing further what is meant by the term)? – barlop – 2015-08-25T21:17:10.927
@barlop, Yeah, I'm aware of of the
-T
flag and allocating pseudo-TTYs. That is not what I'm talking about, I'm talking about an application that acts like a shell (shell and TTY are different), but is not a real shell. – heavyd – 2015-08-25T21:22:28.280Let us continue this discussion in chat.
– barlop – 2015-08-25T21:24:01.223Your should tag your question with appropriate system tag to get more attention from experts on the system. – Martin Prikryl – 2015-08-26T05:09:46.483