Rsync over SSH - Problems

6 posts / 0 new
Last post
itefix
Offline
Last seen: 2 weeks 14 hours ago
Joined: 01.05.2008 - 21:33
Rsync over SSH - Problems

Hi!
Could you please help me with this issue? I am a newbie to SSH as well as Rsync. I am using the latest version Cwsync 2.0.1

The batch file was created using security wrapper wizard. It is as follows: -

@ECHO OFF
SET SECHAW_IDENTITY="C:\Documents and Settings\Administrator\Desktop\cwrsync.txt"
SET SECHAW_TYPE=SSH
SET SECHAW_LOCALPORT=9119
SET SECHAW_SERVER=70.84.153.101
SET SECHAW_SERVERPORT=873
SET SECHAW_USER=SvcwRsync
SET SECHAW_CMD="C:\Program Files\cwRsync\bin\rsync.exe" -av /cygdrive/c/hello rsync://SvcwRsync@localhost:9119/upload
SET SECHAW_TUNNEL=ssh -i "C:\Documents and Settings\Administrator\Desktop\cwrsync.txt" -L 9119:127.0.0.1:873 SvcwRsync@70.84.153.101 -T -N
"C:\Program Files\cwRsync\bin\sechaw.exe" --verbose
____________________________________________________

The private key file cwrsync.txt was created from the Private key on the server.

When I run the batch file, I get the following results: -
C:\DOCUME~1\ADMINI~1\DESKTOP>testsecure
Tunnel: SSH
Command to run: "C:\Program Files\cwRsync\bin\rsync.exe" -av /cygdrive/c/hello r
sync://SvcwRsync@localhost:9119/upload
Tunnel command: ssh -i "C:\Documents and Settings\Administrator\Desktop\cwrsync.
txt" -L 9119:127.0.0.1:873 SvcwRsync@70.84.153.101 -T -N
Establishing secure channel ...
The authenticity of host '70.84.153.101 (70.84.153.101)' can't be established.
RSA key fingerprint is a6:67:b7:d8:9c:db:d1:25:a6:ac:d6:29:f7:6d:75:14.
Are you sure you want to continue connecting (yes/no)? rsync: failed to connect
to localhost: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(98)
Terminating secure channel ...

C:\DOCUME~1\ADMINI~1\DESKTOP>
________________________________________________________

The operation seems to be going wrong at two points.

1. The identity of the host can not be established. I have taken the key from the server and created the cwrsync.txt file containing the private key. What could be the possible reasons for authentication not taking place properly?

Secondly, connection to the local host is refused. what could be the possible cause? Do I have to create an account svcwsync at the client computer and try the batch file from that account?

Any help will be appreciated.

Sangeeta

itefix
Offline
Last seen: 2 weeks 14 hours ago
Joined: 01.05.2008 - 21:33
Re: Rsync over SSH - Problems

Hi,
Batch file produced by the wizard assumes that the identity of target host (70.84.153.101 in your case) is already authorized by you for ssh communication. Try following one-time procedure:

  • Initiate ssh connection by typing ssh svcwrsync@70.84.153.101
  • You will get the question The authenticity of host '70.84.153.101 (70.84.153.101)' can't be established.RSA key fingerprint is xx:xx:.....:xx. Are you sure you want to continue connecting (yes/no)?. Answer yes
  • Interrupt the process by typing Ctrl-C when you're being asked for the password

You should now be able to use the batch file created by the wizard.

NB! Future versions will handle this problem better.

itefix
Offline
Last seen: 2 weeks 14 hours ago
Joined: 01.05.2008 - 21:33
Re: Rsync over SSH - Problems

Hi,

My problem is the same as the Author of this topic.
After follow the instrution of the site admin, conneting to the remote site may success, but it still failed to connect to localhost.

When I run the batch file, I get the following results:
Tunnel: SSH
Command to run: "d:\cwRsync\bin\rsync.exe" -atvr /cygdrive/d/test/ rsync://SvcwRsync@localhost:9119/test
Tunnel command: ssh -i "D:\cwRsync\ssh_key_rsync" -L 9119:127.0.0.1:873 SvcwRsync@202.177.19.111 -T -N
Establishing secure channel ...
SvcwRsync@202.177.19.111's password: rsync: failed to connect to localhost:Connection refused
rsync error:error in socket IO ar clientserver.c
Terminating secure channel ...

I am sorry to ask the same problem with the author:

What could be the possible cause to the fail to connect to local host? Do I have to create an account svcwsync at the client computer and try the batch file from that account?

itefix
Offline
Last seen: 2 weeks 14 hours ago
Joined: 01.05.2008 - 21:33
Re: Rsync over SSH - Problems

It seems that your PC doesn't allow connection to port 9119 on localhost. Do you have a kind of firewall ?

itefix
Offline
Last seen: 2 weeks 14 hours ago
Joined: 01.05.2008 - 21:33
Re: Rsync over SSH - Problems

I have checked the state of port 9119. It is not user no blocked by any other program.
In Addition, I found an error during the Rsync server site install. It is:

Grant service account necessary rights and permissions
Granting SeCreateTokenPrivilege to SvcwRsync ... successful
Granting SeAssignPrimaryTokenPrivilege to SvcwRsync ... successful
Granting SeIncreaseQuotaPrivilege to SvcwRsync ... successful
Granting SeServiceLogonRight to SvcwRsync ... successful
Granting SeTcbPrivilege to SvcwRsync ... successful
Granting SeDenyBatchLogonRight to SvcwRsync ... successful
Granting SeDenyInteractiveLogonRight to SvcwRsync ... successful
Granting SeDenyNetworkLogonRight to SvcwRsync ... successful
Granting SeDenyRemoteInteractiveLogonRight to SvcwRsync ... failed
AddUserRightToAccount:

***Error*** AddUserRightToAccount -1073741728
Create shortcut: C:\Documents and Settings\Administrator\Start Menu\Programs\cwRsync Server\04. Private key for Service Account.lnk
Completed


How can i solve it? And is it the possible reason for connection fail? Thanks for your help.

JenyaKhrichtchatyi
Re: Rsync over SSH - Problems

Hi,

Batch file produced by the wizard assumes that the identity of target host (70.84.153.101 in your case) is already authorized by you for ssh communication. Try following one-time procedure:

  • Initiate ssh connection by typing ssh svcwrsync@70.84.153.101
  • You will get the question The authenticity of host '70.84.153.101 (70.84.153.101)' can't be established.RSA key fingerprint is xx:xx:.....:xx. Are you sure you want to continue connecting (yes/no)?. Answer yes
  • Interrupt the process by typing Ctrl-C when you're being asked for the password

You should now be able to use the batch file created by the wizard.

NB! Future versions will handle this problem better.

 

thank you Admin for this solutiion!!!!!!!!!!!!!!!!!!!!!!!!!!

Topic locked

Release announcements