I am using
(plink -ssh -l MYNAME -pw MYPASS -m .\empty.txt XXX.XXX.XXX.XXX <.\commands.txt)>>output.txt 2>>&1
from a previous post which works fine however after I have ssh'ed into the device I then wish to telnet to another device to do some commands and get the output.
The problem is I get this output because it closed to fast:
Connected to xxx.xxx.xxx.xx
Escape character is '^]'.
Connection closed by foreign host.
Any help to make it wait longer?