SSH rsync with no password -- How To

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 ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-26-2003
Rob
 
Posts: n/a
Default SSH rsync with no password -- How To

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:20 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0