Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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 7 '12 at 3:53
    
Sorry about that, I meant remote shell protocol I guess? –  Matthew Feb 7 '12 at 4:02
1  
Still, "remote shell protocol" is not a shell. It's a means of accessing a server remotely. bash, zsh, csh, etc. are shells. –  EEAA Feb 7 '12 at 4:03
1  
SSH 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 7 '12 at 4:07
1  
Sure thing, understood. I'll grant - it is indeed confusing. –  EEAA Feb 7 '12 at 4:09
show 1 more comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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 7 '12 at 4: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 7 '12 at 22:10
add comment

From the man page:

"Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network."

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.