Find the answer to your Linux question:
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) ...
  1. #1
    Just 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?

  2. #2
    Just 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.

  3. #3
    Just 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?

  4. #4
    Just 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.

  5. #5
    Linux 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.

  6. #6
    Just Joined!
    Join Date
    Aug 2009
    Posts
    3
    plink was the script I was looking for. Thanks guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...