Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

And, just making sure I have this right, if I copy a file from a server with this command:

$  rsync  mvmacd@ssh.mysite.com:~/credit_card_numbers.txt ./

[Not that I actually have that file on my server--just an example of confidential docs x-D ]The .txt file [or any kind of file] would not be sent in plaintext, but would be encrypted? With my Key file or something in ~/.ssh, right? And nobody snooping on the connection [gov, people on my network, etc etc] would be able to view the file?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

A randomly generated, symmetric session key is used for encrypring the communication between client and server. During the connection the key is shared by both parties, when the session ends, the key is destroyed.

SSH version 1 (SSH-1) uses only a single key, while SSH-2 has several: each direction (client->server, server->client) and others for integrity checking.

SSH-2 provides a way for either side of an SSH connection to initiate a re-keying ("Session rekeying"), causing client and server to negotiate new session keys.

Source: O'REILLY - SSH The Definitive Guide

As EightBitTony mentioned, use scp.

share|improve this answer
    
rsync uses SSH as the default transport as of release 2.6.0 (January 2004). [No self-respecting distributor would change this to something insecure.] –  grawity Aug 6 '11 at 18:53
    
And no self respecting sysadmin would assume it was using ssh, when you can just stick -e ssh in and be sure. –  EightBitTony Aug 6 '11 at 23:21
add comment

rsync might not be encrypted. It usually runs over ssh by default (and hence is encrypted) if it's not talking to an rsync server, but it might have been configured / compiled to use rsh or some other remote shell.

ssh (and scp, which runs over SSH) is encrypted using public/private key encryption, nothing that travels over the connection can be interpreted without access to the private keys. People are prevented from not only reading the contents of the file, but from knowing you're even transferring one, they can just see encrypted traffic.

To be sure, you can use,

rsync -e ssh .....................
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.