View Full Version : running SSH from a windows .bat file?
11-04-2010, 01:53 PM
I want to initiate an SSH session to a remote machine and run a single command..
However, I want the whole process to be initiated from a single .bat file in windows.
How would I do this?
11-04-2010, 02:53 PM
11-04-2010, 04:19 PM
thanks that looks exactly what I need...
what would be the easiest way to prevent the remote box from asking for a password...using saved session or a private key?
11-04-2010, 04:32 PM
11-04-2010, 05:07 PM
Well I will be using this only on an internal lan so I am not worried about security...Can I use the same saved putty session for multiple batch files with different commands?
11-04-2010, 05:54 PM
11-04-2010, 09:10 PM
I created a saved session by following this:
1. Click on the little computers in the title bar to bring up the menu.
2. Click "Change Settings". This will bring up the PuTTY Reconfiguration screen.
3. In the blank box under the words "Saved Settings", put a name for your session.
4. Click "Save".
However, it still asks for a username and password, how do I get those details stored in the saved session too?
12-04-2010, 07:45 AM
12-04-2010, 09:12 AM
I gave that a shot but it still prompts for credentials, see attached..what did I do wrong?
20-04-2010, 07:28 PM
Use putty, it will save the certification and the sessions for you!
20-04-2010, 10:45 PM
Have a look at this http://computer-vet.com/weblog/2008/01/28/remote-command-line-on-windows.html