Question

wants to execute the Unix commands saved in text file from batch file using putty.

I've created a .bat file with this line:

start C:\Users\putty.exe -load "server" -l userID -pw Password -m commands.txt

and commands.txt file contained Unix command

ls 

I got the success to logged-in in my account through putty But the command ls added in text is not executed

Assuming there is no need to use plink.exe since i can logged-in with putty.exe itself

Was it helpful?

Solution

Its getting executed, its just you are not able to see it, it disappers before you can note anything

to be sure just change your command.txt content from

ls 

to

ls >file_ls

and then check the file 'file_ls' in your home directory on "server" It will have ls output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top