ssh/scp works but rsync just constantly says ânoâ

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.
I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.
I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.
Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?
linux ssh rsync scp cygwin
add a comment |Â
up vote
3
down vote
favorite
Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.
I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.
I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.
Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?
linux ssh rsync scp cygwin
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.
I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.
I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.
Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?
linux ssh rsync scp cygwin
Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.
I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.
I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.
Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?
linux ssh rsync scp cygwin
linux ssh rsync scp cygwin
asked May 11 '13 at 17:31
MacLovin
182
182
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
6
down vote
accepted
Yes, of course you have to:
rsync -e 'ssh -p 222' ...
or:
RSYNC_RSH='ssh -p 222' rsync ...
Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:
Host that-host
Port 222
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
add a comment |Â
up vote
0
down vote
A very late answer, but one that may help others...
rsync runs in one of two modes.
You can run it across
ssh, and the localrsyncprocess will start anrsyncprocess on the remote system to act as its server, withsshproviding the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:rsync /path/to/local/ remote:/path/to/remoteYou can run it as a daemon, and the local
rsyncprocess will connect directly to an already-running serverrsyncprocess. There is no encryption (orssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:rsync /path/to/local remote::/path/to/remote
You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.
For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.
In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
Yes, of course you have to:
rsync -e 'ssh -p 222' ...
or:
RSYNC_RSH='ssh -p 222' rsync ...
Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:
Host that-host
Port 222
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
add a comment |Â
up vote
6
down vote
accepted
Yes, of course you have to:
rsync -e 'ssh -p 222' ...
or:
RSYNC_RSH='ssh -p 222' rsync ...
Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:
Host that-host
Port 222
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
add a comment |Â
up vote
6
down vote
accepted
up vote
6
down vote
accepted
Yes, of course you have to:
rsync -e 'ssh -p 222' ...
or:
RSYNC_RSH='ssh -p 222' rsync ...
Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:
Host that-host
Port 222
Yes, of course you have to:
rsync -e 'ssh -p 222' ...
or:
RSYNC_RSH='ssh -p 222' rsync ...
Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:
Host that-host
Port 222
answered May 11 '13 at 17:45
Stéphane Chazelas
291k54542882
291k54542882
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
add a comment |Â
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
yes that works perfectly thank you
â MacLovin
May 11 '13 at 18:31
add a comment |Â
up vote
0
down vote
A very late answer, but one that may help others...
rsync runs in one of two modes.
You can run it across
ssh, and the localrsyncprocess will start anrsyncprocess on the remote system to act as its server, withsshproviding the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:rsync /path/to/local/ remote:/path/to/remoteYou can run it as a daemon, and the local
rsyncprocess will connect directly to an already-running serverrsyncprocess. There is no encryption (orssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:rsync /path/to/local remote::/path/to/remote
You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.
For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.
In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.
add a comment |Â
up vote
0
down vote
A very late answer, but one that may help others...
rsync runs in one of two modes.
You can run it across
ssh, and the localrsyncprocess will start anrsyncprocess on the remote system to act as its server, withsshproviding the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:rsync /path/to/local/ remote:/path/to/remoteYou can run it as a daemon, and the local
rsyncprocess will connect directly to an already-running serverrsyncprocess. There is no encryption (orssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:rsync /path/to/local remote::/path/to/remote
You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.
For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.
In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
A very late answer, but one that may help others...
rsync runs in one of two modes.
You can run it across
ssh, and the localrsyncprocess will start anrsyncprocess on the remote system to act as its server, withsshproviding the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:rsync /path/to/local/ remote:/path/to/remoteYou can run it as a daemon, and the local
rsyncprocess will connect directly to an already-running serverrsyncprocess. There is no encryption (orssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:rsync /path/to/local remote::/path/to/remote
You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.
For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.
In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.
A very late answer, but one that may help others...
rsync runs in one of two modes.
You can run it across
ssh, and the localrsyncprocess will start anrsyncprocess on the remote system to act as its server, withsshproviding the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:rsync /path/to/local/ remote:/path/to/remoteYou can run it as a daemon, and the local
rsyncprocess will connect directly to an already-running serverrsyncprocess. There is no encryption (orssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:rsync /path/to/local remote::/path/to/remote
You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.
For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.
In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.
answered 14 mins ago
roaima
41.6k548113
41.6k548113
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f75447%2fssh-scp-works-but-rsync-just-constantly-says-no%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password