Plink Output Code Bat file

July 16, 2009 at 07:09:49
Specs: Windows XP
Hi,

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:

Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xx
.
Escape character is '^]'.
Connection closed by foreign host.

Any help to make it wait longer?


See More: Plink Output Code Bat file

Report •


#1
July 17, 2009 at 02:36:33
gamarga, you can add commas (,) to modem command strings to create pauses. Maybe here too?
HTH.
Ed in Texas.

Report •

#2
July 22, 2009 at 07:28:48
Hi,

Thanks for the reply. It doesnt seem to work. I think the problem is that its starting a new session within a session so it stops recording the output and puts what its got into the output.txt

Any other suggestions or scripts?


Report •

Related Solutions


Ask Question