Running remote scripts on Linux Servers from Windows

25,534

You are already using great protocol for remote access (SSH). I would recommend you to use it for running commands remotely too. PuTTY you mentioned contains also a text console SSH client plink. If the remote scripts are not very interactive the best option would be to use plink:

plink [options] [user@]host [command]

If the script is highly interactive it could be better to use the classical GUI PuTTY.

putty -ssh -l user -pw password -m command.txt host

In this case you have to create a file (command.txt) and store the command to execute there. Here is more information about PuTTY command line.

For this use of SSH it could be very helpful to use a public key authentication instead of passwords. Then it is possible to run the commands without entering a password. See for example: Public Key Authentication With PuTTY or Key-Based SSH Logins With PuTTY.

Share:
25,534

Related videos on Youtube

Davio
Author by

Davio

Updated on September 18, 2022

Comments

  • Davio
    Davio over 1 year

    I'm on a Windows server, I'm looking for a way to run some scripts (through RSH?) remotely on Linux servers.

    Thing is, I have to do a lot of stuff manually on different servers whenever I want to test something and I'd like to automate it, also to make it less error-prone.

    Is there any way to do this?

    Currently I'm just logged in to SSH terminals with Putty and run the scripts locally on the Linux servers.

  • commonpike
    commonpike almost 4 years
    Apparently, you can also set the command in the ssh panel of your configuration - the.earth.li/~sgtatham/putty/0.63/htmldoc/…