Trying to do following in one macro:
1. ssh to the 1st remote server, run something,
disconenct from it.
2. ssh to the 2 second remote server, run something,
disconnect from it.
I used one of follwoing to disconnet from the 1st
server:
1. sendln 'exit'
2. unlink
3. disconnect
Non of above work. After the first conenction is
closed, nothing happened (the 2nd ssh connection
never appear). The macro icon still active and when
click on it, a messagebox showed with title "MACRO -
~macroC2.ttl", the message text showing some line
number "57:sendln 'ls -ltr'.
When you send 'exit' string to the server, the network is immediately down. So, you need to insert a few wait before the second connection. Refer to below sample script.
server = "shell.sourceforge.jp /auth=pageant /user=foo"
prompt = "foo@sf-usr-shell%"
connect server
wait prompt
sendln ""
sendln "exit"
do
mpause 10
testlink
loop while result == 2
connect server
wait prompt
sendln ""
sendln "exit"
1. ssh to the 1st remote server, run something,
disconenct from it.
2. ssh to the 2 second remote server, run something,
disconnect from it.
I used one of follwoing to disconnet from the 1st
server:
1. sendln 'exit'
2. unlink
3. disconnect
Non of above work. After the first conenction is
closed, nothing happened (the 2nd ssh connection
never appear). The macro icon still active and when
click on it, a messagebox showed with title "MACRO -
~macroC2.ttl", the message text showing some line
number "57:sendln 'ls -ltr'.
If I use closett instead, things then worked.
No sure if it's a bug or sippose to be this way.
Thanks,
Jesse