SSH password inputer script

2 posts / 0 new
Last post
itefix
Offline
Last seen: 2 hours 24 min ago
Joined: 01.05.2008 - 21:33
SSH password inputer script

Hi All,
I was looking to automate my cwrsync backups on my local Windows 2003 server from my Linux box. I found this scripting tool that allows you to send commands to the shell, thus mimicking that you are there entering the SSH password. Here it is:

cwrsync.vbs (this is the name of the file, put in your cwrsync dir)
=================================
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cwrsync.cmd"
Wscript.Sleep 5*1000
WshShell.SendKeys "yourpasshere{ENTER}"
=================================

to run this script use the following command:
cscript cwrsync.vbs

What it does it first create a new shell windows with the cwrsync command file which has your rsync commands in it. Then it waits 5 seconds and simulates your typing your password and the ENTER key to that terminal window. Now you can do automated backups.

Good luck :)

itefix
Offline
Last seen: 2 hours 24 min ago
Joined: 01.05.2008 - 21:33
Re: SSH password inputer script

I've just used public key authentication with ssh-keygen.
-=Russ=-

Topic locked

Release news