Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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|improve this answer
    
Yeah, this helps a lot, thanks. –  Davio Nov 8 '13 at 14:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.