3

I just want to create a auto script on windows which could do run some comand through ssh on a reomote linux.

I know it's easy to write script between linux(ssh client) and linux(ssh server).

But I do not know how to create a script on windows(ssh client) to remote connect to linux(ssh server)

4 Answers 4

1

If it's just some command lines you want to run then plink will be enough IMHO..

Goodluck.

Sign up to request clarification or add additional context in comments.

Comments

1

Most popular languages have ssh libraries you can use, pick a language you are familiar with and then go library hunting.

I've used these with success:

C - libssh
.NET - SharpSSH
Python - Paramiko or Really Simple SSH or Fabric

Comments

1

use plink (get it from putty website) and a bat file format like this:

Plink.exe -ssh -pw %password5 %linuxuser%@%servver% /path/to/script/script.sh

Save em in same folder -> run your awesome masterpiece

Comments

0

One way is to install Cygwin and use a shell script to run ssh commands. You can launch this script by running sh.exe with arguments.

This way, you can do the job with the same Linux tools (sh and OpenSSH) that you are already familiar with.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.