how to do Putty SSH Auto-Login and Run Command File
- by supportpb
I am using the follwing to auto login and then run file containng a command.
C:\path\to\putty.exe -load "[Sessionname]" -l [user] -pw [password] -m C:\path\to\commands.txt
Commands.txt contains the following command
ps -elf|grep 'sometext'
but when I try to do so a new window for putty comes and exits instantly after login. I cannot see the output of command in commands.txt
What is the problem;. Is there error in my approach or I need some more command to make the putty window pause for sometime before exiting.