Just curious, what is the default remote shell used by rsync when you're not using it in daemon mode? According to the man page it can be run via rsh or ssh. However nowhere in the man page does it specify how to set which one to use. So, when running it it prompts me for a password, but it doesn't seem to indicate which remote shell is being used. I know this is probably a dummy question, but I could really use some clarification. Thanks!
Asked
Active
Viewed 6,980 times
8
-
Give us an example of how you're invoking rsync. BTW, you have some of your nomenclature messed up. Neither `rsh` nor `ssh` are shells. – EEAA Feb 07 '12 at 03:53
-
Sorry about that, I meant remote shell protocol I guess? – Matthew Feb 07 '12 at 04:02
-
1Still, "remote shell protocol" is not a shell. It's a means of accessing a server remotely. `bash`, `zsh`, `csh`, etc. are shells. – EEAA Feb 07 '12 at 04:03
-
4SSH is literally the secure shell, rsh literally means remote shell. While they aren't specifically shells like zsh, csh, bash, etc, their name still contains the word shell, so its not really clear what to call them for conversation. I am agreeing with you, I just wasn't sure how else to ask the question or how to refer to ssh vs rsh in a generic sense. – Matthew Feb 07 '12 at 04:07
-
1Sure thing, understood. I'll grant - it is indeed confusing. – EEAA Feb 07 '12 at 04:09
-
@EEAA This post is kind of old but I think it's worth noting that in my man pages the --rsh option is described by the text "specify the remote shell to use". So, I'd say that the nomenclature is sort of inherently ambiguous. – doliver Jul 02 '14 at 20:58
2 Answers
5
It's going to default to whatever shell you have set as default on the remote side. if your rsync line looks like this:
rsync -avz /local/file remoteuser@remote.host:/remote/file
... Then it's going to be remoteuser's default shell. Easy way to check is to cat /etc/passwd
EDIT: I answered what you asked, but not what you meant. Simple rule of thumb: If you're using two colons, you're probably using rsh. If you're using one colon, it's ssh.

Joel E Salas
- 5,572
- 16
- 25
-
You got it, thank you! Sorry about being less than clear, wasn't really sure what the correct nomenclature was, but you seem to have figured it out. Thanks for clearing it up! – Matthew Feb 07 '12 at 04:01
-
Actually two colons is the rsync protocol, one is the remote shell transport, with the shell transport being specified by the `-e` flag or the `RSYNC_RSH` environment variable. – James O'Gorman Feb 07 '12 at 22:10
3
From the man page:
"Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network."

Simon
- 131
- 2