Solved

How to rsync without password on Ubuntu 12.04.4 LTS

Posted on 2014-04-03
8
789 Views
Last Modified: 2014-04-04
Hi Experts,

I had a look on several articles on the Internet but I didn't found exactly how do I to need to configure the server to perform rsync without password with the second host. It's always prompting for the password even after I have shared the RSA key to the second server.

Someone please provide me the clean and neat steps for this purpose ?

I'm trying to enable "archive command" on a Postgres Hot Standby cluster.

Thanks a lot for your time !
0
Comment
Question by:Shakthi777
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 13

Expert Comment

by:Sandy
ID: 39974730
Configure keyless auth of ssh between the nodes then you can use.

TY/SA
0
 
LVL 20

Assisted Solution

by:carlmd
carlmd earned 166 total points
ID: 39974751
The following will tell you how to do this.

http://www.thegeekstuff.com/2011/07/rsync-over-ssh-without-password/
0
 
LVL 8

Assisted Solution

by:Pepe2323
Pepe2323 earned 167 total points
ID: 39975580
Hi

the thing to access to ur second node without password is ssh config

create ur keys on first node

ssh-keyget -t rsa

when it ask for password just push enter

on ur user home directory, you will see a directory name .ssh

there you will find some files

make sure to copy id_rsa.pub to ur second node on home directory/.ssh/ as authorized_keys

and that should make that u can access from first node to the second without password
0
 
LVL 8

Expert Comment

by:Pepe2323
ID: 39975585
My bad the command is ssh-keygen  i typed wrong on my last post
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 27

Accepted Solution

by:
serialband earned 167 total points
ID: 39977158
Did you load your private key & passphrase before you attempted a connection?
eval ssh-agent
ssh-add YOUR_PRIVATE_KEY


You could create a key without a passphrase, but you still need to load it first.  The public on the remote server is useless without the private key to authenticate to.


Another way is to enable NFS and mount the drive from the remote server.  rsync will copy over nfs mounts without a password.

You can also enable the native rsync service port on your secure local subnet and set a blank password.  This method is insecure, so you only do this if you trust your network.
http://transamrit.net/docs/rsync/

If you want security over a remote internet connection, then you really should use ssh keys, but it's just one of the ways you can rsync.
Here's another link about setting up rsync using ssh keys
https://blogs.oracle.com/jkini/entry/how_to_scp_scp_and
0
 

Author Closing Comment

by:Shakthi777
ID: 39977441
Thanks for the comments however I have used sshpass as an alternative option of doing it;

http://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/
0
 
LVL 27

Expert Comment

by:serialband
ID: 39978487
That puts your password in your command line history in plain text.  It's not really a secure way to do it since you've defeated one of the points of ssh.  I still suggest you use ssh keys.
0
 

Author Comment

by:Shakthi777
ID: 39978504
Thanks for the comments "serialband" !
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now