This is a discussion on SSH rsync with no password -- How To within the Rsync forums, part of the Networking and Network Related category; Greetings! After struggling with this for HOURS and not seeing a clear cut post on any newsgroup, I thought I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Greetings!
After struggling with this for HOURS and not seeing a clear cut post on any newsgroup, I thought I might make a post here. This was done on a RedHat 9 machine: To setup SSH rsync with NO PASSWORD. Client Machine (File Sender) Step 1) With the user you plan to run rsync ssh as (for example 'localuser'). Run: ssh-keygen -q -b 1024 -t rsa Select defaults for path and overwrite if existing. DO NO ENTER A PASSPHRASE if you wish this to function without a password. Step 2) Run ssh-keygen -q -b 1024 -t dsa Select defaults for path and overwrite if existing. DO NO ENTER A PASSPHRASE if you wish this to function without a password. Step 3) Edit /etc/ssh/ssh_config and uncomment the following lines: IdentityFile ~/.ssh/identity IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_dsa Server Machine (File Receiver) Step 1) Edit /etc/ssg/sshd_config and uncomment the following lines: RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys Step 2) Restart the xinetd service: /etc/initd/xinetd restart Step 3) When you copy files, you're going to use an existing user id on the remote server, for this example we'll use 'remoteuser'. Edit /home/remoteuser/.ssh/authorized_keys -- it may not exist... ***From the CLIENT MACHINE, copy /home/localuser/.ssh/id_rsa.pub and paste it into the /home/remoteuser/.ssh/authorized_keys file just opened. MAKE SURE the entire key is on a single line. ***Do the same with /home/localuser/.ssh/id_dsa.pub. ********************************** At this point, you should now be able to copy your files over -- as localuser run: rsync -avz -e ssh --exclude "*.o" --exclue "*core*" /home/localhost/pathtocopyfrom/ remoteuser@remotemachine:~/pathtocopyto/ This command will archive, run verbose, compress, and use ssh as the transfer protocol, excluding all files that match the masks *.o and *core*. I *believe* this is everything. Best of luck. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|