Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a requirement to execute multiple shell scripts on the Linux severs regularly. Is there any tool in windows that connect to a Linux server and execute the given script with given user and shows the output in windows machine.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

use plink (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html), you also can use putty to execute the ssh command but you can't get the output.

C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword uptime
06:40:58 up 50 days,  3:30,  8 users,  load average: 0.00, 0.07, 0.10

C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword uptime > output.txt

C:\>type output.txt
06:41:45 up 50 days,  3:31,  8 users,  load average: 0.00, 0.06, 0.09

execute script

C:\>type cmd.txt
uptime

C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword -m cmd.txt
06:41:45 up 50 days,  3:31,  8 users,  load average: 0.00, 0.06, 0.09
share|improve this answer
    
Wonderful, I am looking for this kind of tool only. –  Sriharsha Kalluru Nov 15 '12 at 7:32
add comment

You can just use PuTTY. Just create a saved session using SSH which executes the script on the server. It will SSH into the sever, execute the script, and display the output.

share|improve this answer
    
I am looking for any tool that stores username, password and path of the script and to return the output. I don't want to enter the input manually. –  Sriharsha Kalluru Nov 15 '12 at 5:26
1  
@user1005707 Yes, PuTTY can do that; you can set up a saved session which includes a username and the command to run. It won't save the password, but the preferred way to do this securely is use an SSH key and Pageant to load it once and then not have to type the password again. –  Brian Campbell Nov 15 '12 at 5:32
add comment

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.