Rsync over SSH-tunnel A-B-C using daemon on C

2005-10-12 Thread Stefaan Lhermitte

Dear,

I'm trying to put up a scripts to synchronize my computers (HOST_A and 
HOST_C). I can connect both via HOST_B to avoid the firewall.

I am trying to work with the rsync daemon to avoid hanging.

I tried to figure out the mailinglist + FAQ, how to do it, but it seems 
I misunderstand something, since all your previous help did not work for 
me.

I get the following error when executing the rsync-step:

Failed to connect to HOST_C: Connection timed out (116).

The scipt I now use is:

# On HOST_A the following commands are executed

# Start rsync daemon on HOST_C and check rsyncd.conf file
ssh HOST_B ssh HOST_C rsync --daemon
ssh HOST_B ssh HOST_C cat /etc/rsycd.conf

# Create SSH-tunnel
ssh -fN -l myusername -L 8873:HOST_B:8873 HOST_C

# Rsync folders
rsync -auv rsync://HOST_C:8873/module_on_HOST_C/folder_on_HOST_C 
/folder_on_HOST_A


# Close rsync daemon on HOST _C and SSH-tunnel
ssh HOST_C killall rsync
killall ssh

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Rsync hangs after a while when tunneling from A-B-C

2005-10-11 Thread Stefaan Lhermitte

Dear Rsyncians,

I'm trying to Rsync my windowsXP-pc A and C. There is a firewall in 
between A and C, but we have a port open on a linux-machine B to access 
C from A (and vica versa) via B.


When I now run my Rsync scripts in cygwin:



# 
___

#!/bin/bash
# Command to synchronize (only update) two computers based on RSYNC

FOLDER_SOURCE=/cygdrive/d/scripts
FOLDER_TARGET=/cygdrive/g/stefaanlh/scripts
PC_SOURCE=ip of pc-A
PC_TARGET=ip of pc-C

echo Synchronizing of SOURCE with TARGET
rsync -auvvvz --timeout=999 -e ssh [EMAIL PROTECTED] ssh 
$FOLDER_SOURCE/ $PC_TARGET:$FOLDER_TARGET

echo Synchronizing of TARGET with SOURCE
rsync -auvvvz --timeout=999 -e ssh [EMAIL PROTECTED] ssh 
$PC_TARGET:$FOLDER_TARGET/ $FOLDER_SOURCE

echo Done
# 
___



Rsync hangs unexplainable after a while (+-a minute). You can see the 
end of my log-file below my email.
It looks like a time-out because, when I restart the program after it 
hangs it continues where it stopped before and afterwards hangs again 
after a minute.


Is there anyone with advice on how to solve this?

Thanks in advance and kind regards,
Stef



Log-file:
set modtime of cpp/area_extract_sl_1x00/.area_extract.layout.d1AQ20 to 
(1074535293) Mon Jan 19 19:01:33 2004
renaming cpp/area_extract_sl_1x00/.area_extract.layout.d1AQ20 to 
cpp/area_extract_sl_1x00/area_extract.layout

false_alarms=0 tag_hits=0 matches=0
sender finished 
/cygdrive/g/stefaanlh/scripts/cpp/area_extract_sl_1x00/area_extract.layout
send_files(90, 
/cygdrive/g/stefaanlh/scripts/cpp/area_extract_sl_1x00/area_extract.o)
send_files mapped 
/cygdrive/g/stefaanlh/scripts/cpp/area_extract_sl_1x00/area_extract.o of 
size 6253

recv_files(cpp/area_extract_sl_1x00/area_extract.o)
cpp/area_extract_sl_1x00/area_extract.o
calling match_sums 
/cygdrive/g/stefaanlh/scripts/cpp/area_extract_sl_1x00/area_extract.o

sending file_sum
got file_sum
set modtime of cpp/area_extract_sl_1x00/.area_extract.o.RHXhoJ to 
(1070450786) Wed Dec  3 12:26:26 2003
renaming cpp/area_extract_sl_1x00/.area_extract.o.RHXhoJ to 
cpp/area_extract_sl_1x00/area_extract.o

false_alarms=0 tag_hits=0 matches=0
sender finished 
/cygdrive/g/stefaanlh/scripts/cpp/area_extract_sl_1x00/area_extract.o

send_files(91, /cygdrive/g/stefaanlh/scripts/cpp/edison_src.zip)
send_files mapped /cygdrive/g/stefaanlh/scripts/cpp/edison_src.zip of 
size 1120295

recv_files(cpp/edison_src.zip)
cpp/edison_src.zip
calling match_sums /cygdrive/g/stefaanlh/scripts/cpp/edison_src.zip


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: RSync + SSH tunneling through firewall

2004-09-09 Thread Stefaan Lhermitte




Haai Andrzej,

The problem is solved. When I double checked the ssh-b file I realized
I had to change the linux commands to cygwin commands. 
>From that moment all commands (like date, hostname...) worked on the
C-host

So with the key authentification and the following ssh-b script:
#!/bin/bash
ssh [EMAIL PROTECTED] ssh "$@"

the rsync command works:
rsync -auv -e ~/ssh-b /cygdrive/driveletter/localfolder/
host_C:/cygdrive/driveletter/remotefolder
and I don't get the pseudo terminal warning anymore.

Whenever you are in Belgium, I owe you a beer or something else to
drink.
Thanx a lot for all the help. 
Kind regards,
Stef

Andrzej Filip wrote:
Stefaan
Lhermitte wrote:
  
   I did. I can now connect via SSH as wel
from A - B as from B - C.

I also resolved the problem of not being able to connect to C. I
restarted the sshd and now it works.


The problem now stays with the rsync. I used:

rsync -auv -e ~/ssh-b /cygdrive/driveletter/localfolder/
computer-C:/cygdrive/driveletter/remotefolder/

I get no errors but only the following output:

Pseudo-terminal will not be allocated because stdin is not a terminal.


Unfortunately it does not rsynchronize, since no files are copied.

  
  
1) Do you get computer-C shell prompt when you execute "~/ssh-b
computer-C" ?
  
[ you may ignore "pseudo terminal warning in *this* test ]
  
2) What do you get when you execute "~/ssh-b computer-C date" ?
  
[ Is date program executed on C ? ]
  
  
  






-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: RSync + SSH tunneling through firewall

2004-09-09 Thread Stefaan Lhermitte
Yessos, very cool.
It works even with
rsync -auv -e ssh [EMAIL PROTECTED] ssh src_folder host_C:sdt_dir
Sometimes solutions can be very simple...
Unfortunartely all open positions for email postmasters are just filled 
in. I did my best to convince my boss, you were better, but it didn't 
work.:)

Thanx again!
Stef
Andrzej Filip wrote:
It is nice to know it works [finally :) ].
As the last check try to eliminate ssh-b script and test
rsync -auv -e ssh host_B ssh  src_dir host_C:sdt_dir

--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RSync + SSH tunneling through firewall

2004-09-07 Thread Stefaan Lhermitte
Dear RSYNCians,
I'm trying to rsync my labtop pc (let's assume A-computer) with my 
desktop pc (let's assume C-computer) through our firewall.
In between there is one computer (let's assume B-computer) that has an 
open port, so I theoretically could connect via a tunnel.
I checked the SSH- website and internet and so on but did not find an 
answer that works.

I tried the solution I found on the net:
When I run ssh -v -L 873:C-computer:873 [EMAIL PROTECTED] and get 
connected to B-computer without any problems.

When I subsequently run in a new window:
rsync -v /cygdrive/d/folder/ 127.0.0.1:: cygdrive/folder
I get the following error:  Connection reset by peer.
In the tunneling window teh following error appears: administrativetly 
prohibited: open failed

I'm kind of new in the SSH-RSYNC world and don't know how to solve the 
problem.
I assume it is an SSH problem since the problem persist when I run:  ssh 
[EMAIL PROTECTED] -p 873.

Thanx for your help in advance,
Stef
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: RSync + SSH tunneling through firewall

2004-09-07 Thread Stefaan Lhermitte




Nope, I cannot telnet port 873. I tried "telnet C-computer" and "telnet
C-computer 873" but command give the error:
Connection refused.

On the other hand, the SSH command from B-computer to C-computer works
does give connection without any problems.

Thanx in advance,
Stef


Andrzej Filip wrote:
Stefaan
Lhermitte wrote:
  
  I'm trying to rsync my labtop pc (let's
assume A-computer) with my desktop pc (let's assume C-computer) through
our firewall.

In between there is one computer (let's assume B-computer) that has an
open port, so I theoretically could connect via a tunnel.

I checked the SSH- website and internet and so on but did not find an
answer that works.


I tried the solution I found on the net:

When I run ssh -v -L 873:C-computer:873 [EMAIL PROTECTED] and get
connected to B-computer without any problems.


When I subsequently run in a new window:

rsync -v /cygdrive/d/folder/ 127.0.0.1:: cygdrive/folder

I get the following error: Connection reset by peer.

In the tunneling window teh following error appears: administrativetly
prohibited: open failed

  
  
Can you telnet port 873 on C from B ?
  
[ Is rsync daemon listening on C ? ]
  
  
  I'm kind of new in the SSH-RSYNC world and
don't know how to solve the problem.

I assume it is an SSH problem since the problem persist when I run:
ssh [EMAIL PROTECTED] -p 873.

  
  


-- 
________

Stefaan Lhermitte
Research Associate
Lab of Geomatics and Forest Engineering K.U. Leuven
Vital Decosterstraat 102. B-3000 Leuven Belgium
Tel:+32-(0)16-329750 Fax: +32-(0)16-329760 Cell: +32-(0)494-350842
[EMAIL PROTECTED]




-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html