I connect with my Windows cmd to another machine with this command:
putty.exe -ssh bob@172.16.17.50 -i C:\Users\Administrator\Desktop\bobPrivate.ppk -pw mypass
And which option I have to add to run a single command and disconnect after that?
I connect with my Windows cmd to another machine with this command:
putty.exe -ssh bob@172.16.17.50 -i C:\Users\Administrator\Desktop\bobPrivate.ppk -pw mypass
And which option I have to add to run a single command and disconnect after that?
To execute a command you have to use the -m
option.
putty.exe -ssh bob@172.16.17.50 -i C:\Users\Administrator\Desktop\bobPrivate.ppk -pw mypass -m C:\Path\to\file\with\commands
You have to replace the path with yours