Results 1 to 6 of 6
How can I set up a script or shortcut to run commands from a Windows XP machine on my CentOS machine over SSH?
I am running a virtual CentOS (VirtualBox) ...
- 08-21-2009 #1Just Joined!
- Join Date
- Aug 2009
- Posts
- 3
Scripted Commands over SSH
How can I set up a script or shortcut to run commands from a Windows XP machine on my CentOS machine over SSH?
I am running a virtual CentOS (VirtualBox) machine containing my LAMP stack. I also have other tools like subversion, git, etc. on there that I wish to use. On my windows machine, I want to set up quick scripts like 'commit' and send my path with args. I also want to use it for running command line PHP scripts on the remote server.
Any ideas?
- 08-21-2009 #2Just Joined!
- Join Date
- Nov 2008
- Posts
- 11
I'd suggest starting with connecting from windows to linux via ssh (using putty for example). Then you can play around.
- 08-21-2009 #3Just Joined!
- Join Date
- Aug 2009
- Posts
- 3
I already do that.
I'm trying to set up scripts I can quickly execute instead of having to go into putty, login, and type long commands.
Is there a way to have a script do it all in one shot?
- 08-21-2009 #4Just Joined!
- Join Date
- Nov 2008
- Posts
- 11
then you can just write a windows batch file to call ssh (you will have to setup passwordless authentication using ssh - google how to do it), then call any scripts you want on your linux box.
- 08-22-2009 #5Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Read about public keys in Chapter 8 of the Putty User Manual. The public key will be in SSH2 format so you'll have to convert it after you copy it to the Linux system. That's with ssh-keygen -i option. Looks at the manpage for ssh-keygen for details. It'll have to be appended to the ~/.ssh/authorized_keys file.
- 08-22-2009 #6Just Joined!
- Join Date
- Aug 2009
- Posts
- 3
plink was the script I was looking for. Thanks guys


Reply With Quote