LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   windows sceduler and rsync over ssh: need help please (http://www.linuxquestions.org/questions/linux-networking-3/windows-sceduler-and-rsync-over-ssh-need-help-please-265891/)

hamish 12-13-2004 08:07 AM

windows sceduler and rsync over ssh: need help please
 
Hello

I'm currently trying to back up my windows machine every night using SSH and rsync.

I have written a batch file:

Code:


cd c:\

c:\iskm\bin\rsync -alv -e ssh --delete-after /cygdrive/c/iskm/ hamish@hamishnet.homelinux.com:/tmp/test/
c:\iskm\bin\rsync -alv -e ssh --delete-after /cygdrive/c/railroad/ hamish@hamishnet.homelinux.com:/tmp/railroad/
c:\iskm\bin\rsync -alv -e ssh --delete-after /cygdrive/c/kings_bounty hamish@hamishnet.homelinux.com:/tmp/kings_bounty/

Everything is set up so that the client has the dsa key stored in an agent, and can ssh to the client without passwords.

At the moment, if I just run the batch file manually, EVERYTHING works perfectly!!!

However, when the batch file is run by windows scheduler, it does not understand that the idenfication is set and that it doesn't need a password. It says:

Code:

C:\>c:\iskm\bin\rsync -alv -e ssh --delete-after /cygdrive/c/iskm/ hamish@hamishnet.homelinux.com:/tmp/test/
The authenticity of host 'hamishnet.homelinux.com (81.152.70.36)' can't be established.
RSA key fingerprint is 82:97:5c:20:91:75:db:25:fc:df:9d:73:cb:22:83:c2.
Are you sure you want to continue connecting (yes/no)?

Does anyone has any suggestions as to why is says this? When I say "yes" I want to continue, I get further errors, which may be the problem;

Code:

Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/.ssh/known_hosts).
Enter passphrase for key '/.ssh/id_dsa':
hamish@hamishnet.homelinux.com's password:

It asks for the passphrase for the identification key (but there is no passphrase). So if I press etner, it asks for a password. It accepts the password and the performs the rsync successfully. Of course, it then asks for the password for each rsync command.

I has tested this same scenario with simple SSHing, and I get the same problem.

Is this a scheduler problem? That is, not allowing automated connection with remote machines? or can it not find the required programme?

Thanks in advance for all your suggestions.

Hamish

bastard23 12-13-2004 10:03 PM

This is a windows scheduler problem.

the ssh.exe program is looking for the user's ssh config. Make sure you are running this as yourself in the scheduler (it asks what user to use).

I don't know which rsync/ssh .exe you are using. See if it defines where the ssh_config file is located, as this is the same dir as id_dsa (your private key). There probably is an evironment variable that needs to be set.

Good Luck,
chris

hamish 12-14-2004 08:30 AM

Hey
I gave up with scheduler (sadly) and downloaded a small, simple, free seperate scheduler. Everything is working a treat now!!

Thanks for your help.

Hamish

benison 03-27-2007 02:26 PM

what software to use
 
Quote:

Originally Posted by hamish
Hey
I gave up with scheduler (sadly) and downloaded a small, simple, free seperate scheduler. Everything is working a treat now!!

Thanks for your help.

Hamish

Mind letting me or us know what free utility did you use.


All times are GMT -5. The time now is 05:05 PM.