Page 1 of 1

Rsync channel tunnel

Posted: Fri 14 Dec 2007 01:22
by teunis
De server is linux. The client is Windows (with Cygwin)
In a program (delphi 6) I execute with TDosCommand the line
rsync -vrtz --password-file=c:\cygwin\secret --delete SRC user@linux_server::module
Yes it works.
Now let me make an ScSSHClient connection.
Yes it connects
I close 873 on the server
Now port forwarding:

Code: Select all

ScSSHChannel1.DestHost:= address of linuxserver or 127.0.0.1 or localhost;
ScSSHChannel1.DestPort;=  873
Direct:= FALSE;
Remote;= FALSE;
Sourceport:= 873
Connect;
Yes it connects
Now execution of the rsync line
Nothing is happening looks like hanging
Are there any suggestions what might be wrong?

Posted: Fri 14 Dec 2007 14:08
by Dimon
The TScSSHChannel component does not execute commands.
For commands execution you can use the TScSSHShell component.

Posted: Sun 16 Dec 2007 13:46
by teunis
I don't expect the ScSSHChannel to execute a command.
The only thing I expect is that this component listens to SourcePort and sends the
data to DestPort on the Server. (Desthost)

On the Server a rsync daemon listens on port 873
On the client a rsync client program sends data to port 873
When port 873 is firewalled on the server I expect the ScSSHChannel to redirect the data stream via the SSH connection
As explained it does not work. What can I do to troubleshoot?? :?:

Posted: Mon 17 Dec 2007 08:28
by Dimon
In order to solve this problem, perform the next steps:

1. Check, that the rsync client program sends data to the host, where ScSSHChannel1 listens the port 873.
2. Specify ScSSHChannel1.DestHost := '127.0.0.1'.
3. Find the sshd's server config file and set the AllowTcpForwarding parameter to yes.