View Full Version : running SSH from a windows .bat file?
headstrong
11-04-2010, 01:53 PM
Hi Guys
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?
Thanks
werner
11-04-2010, 02:53 PM
content removed
headstrong
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?
werner
11-04-2010, 04:32 PM
content removed
headstrong
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?
werner
11-04-2010, 05:54 PM
content removed
headstrong
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?
thanks
werner
12-04-2010, 07:45 AM
content removed
headstrong
12-04-2010, 09:12 AM
http://www.2shared.com/file/12546725/cdfa7be5/plink.html
I gave that a shot but it still prompts for credentials, see attached..what did I do wrong?
GuDoN
20-04-2010, 07:28 PM
Use putty, it will save the certification and the sessions for you!
bekdik
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