rsync with and without ssh

I have my public key in a server's authorized_keys2 file and it works as expected with ssh and scp.

My question is what happens with rsync? I am no longer prompted for a password when I use rsync. Does this mean I don't have to worry about my password being intercepted but that all the files copied via rsync are sent in the clear?

Thanks.

Dual 1.8 G5, Macbook Pro 2.16 Ghz, Mac OS X (10.4.3), 1.5 GB RAM, iPod, iPod Mini (gone missing)

Posted on Mar 22, 2007 5:20 AM

Reply
6 replies

Mar 22, 2007 9:34 AM in response to foilpan

Thanks. I meant to specify that I was NOT entering ssh in my rsync command line.

So rsync somehow invokes ssh automatically and encrypts the entire session? That sounds good.

What about if you haven't set the keys up? Is the password sent in the clear like FTP?

I need to look for a simple packet analyzer for the Mac. I used to use the one that came with NT when I did Windows work, but I have no idea what is out there for Mac / UNIX /Linux with regards to sniffing.

Mar 22, 2007 10:26 AM in response to bjw

use tcpdump for packet sniffing. if you need more, there are a number of tools out there, like ethereal (or whatever it's called these days).

here's a quote from rsync's man page:

"For remote transfers, a modern rsync uses ssh for its communications, but it may have been configured to use a different remote shell by default, such as rsh or remsh."

so it uses ssh by default. it won't if you set the remote shell to something else.


macbook pro 2.16 ghz, powerbook G4 1ghz, G4 400 mhz, poweredge and some junkers Mac OS X (10.4.9)

Mar 29, 2007 2:07 PM in response to bjw

Question:

Backing up File-Vaulted Home directory with rsync & ssh & doing it all via cron jobbed script:



I've got rsync up and running fine.

I then created and distributed the necessary RSA keys, and this works fine from my limited privilege account called "backup". (as long as filevault is not involved)...

There is an issue with Rsync with SSH and filevault:

1) The target account is named "jeff" (this needs to be backed up)

2) The target directory (/Users/jeff/) is a filevault folder (encrypted sparse image which has been mounted as /Users/jeff/) - the user is jeff, group is jeff and permissions are user=rwx, group=(nothing?), everyone=(nothing)

3) Consequently, I planned to add user "backup" to group "jeff" and then run "chmod g+r /Users/jeff/"

4) Even as root, I cannot chmod /Users/jeff/ (operation not permitted) - I think this may have to do with either:

a) Immutability (either system or user) (I'm looking for the procedure to drop into single-user-only mode and change this immutability temporarily so that I can at least drop a ~/.ssh directory in place with some known keys)

b) Some factor unknown to me (but related to FileVault)(this gets into the sensitive area of "Where are the keys needed to get access to the sparse image, and how can I give my script access to those keys")

5) I then tried to run the backup as user "jeff", but I couldn't set up the authorized_keys file because I could not "/Users/jeff/ mkdir .ssh"(either as user "jeff" or user "root"). I think this too may be because of point #4a.

How should I correct this?


I've developed 2 work-around's (both of which functionally compromise or eliminate the value of filevault):

1)
a) Use my user "jeff" to rsync the /Users/jeff/ directory to a different location on the same machine.
b) Swizzle permissions such that I can run a second rsync script against this backup with user "backup" and send the data to a far-side machine.

2) Similar to above, but we move the iTunes library and hit the live copy with rsync: Move the iTunes & iPhoto & etc. over to a different directory (or for performance reasons a different drive) - utilize them by using the little publicized and demi-supported "hold control during application start to choose a library" capability. - Swizzle permissions such that user "backup" is able to pull backups from there and rsync them to a far-side machine.



I'd really like to set this up properly (leave the files in the filevault and back up directly from them), but I'll fall back to the work-around's if this is not feasible.

Thank you,

Jeff


PowerMac G5 dual 2.5, dual 2.0, Powermac G4 Mac OS X (10.4.8)

PowerMac G5 dual 2.5&2.0, Powermac G4 Mac OS X (10.4.8)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

rsync with and without ssh

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.