0

Currently I use puTTY, open SSH connection to my Ubuntu server and execute some svn update comment over there.

I want to automate that whole process but executing just a script/batch file.

How can I do that?

2 Answers 2

1

I found it myself without using Cygwin - I'm stuck with installing/reinstalling it.

The answer is using Plink from PuTTY.

rem Note
rem ----
rem 01 Update `plink` to point to `plink.exe` on `your PC`
rem 02 Update `pkey` to point to `private key` of `remote server`
rem (the end)

set plink="Path\To\PuTTY\plink.exe"
set user=<your user>
set server=<remote server>
set pkey="Path\To\YourPrivateSSHKey.ppk"
set pass=<your pass>

set run=%plink% -v -pw %pass% -i %pkey% %user%@%server%

rem sample run command
set cmd=svn update /var/www/MyWeb

%run% %cmd%
rem (the end)

Hope that helps

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

Comments

0

Install Cygwin and use its shell and ssh client.

4 Comments

Please give more detail on using Cygwin and ssh from there. Thank you!
I know how to google... Hope that you are more eager to help us. In fact, I've tried Cygwin and failed to call ssh. Any idea Makholm?
As long as you refuse to be more specific about your problems than "tried and failed", then I'm not very eager to help, no.
I'll try again. Return to you later Makholm.

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.