Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to rsync without password on Ubuntu 12.04.4 LTS

Posted on 2014-04-03
8
Medium Priority
?
939 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 664 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 668 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 8

Expert Comment

by:Pepe2323
ID: 39975585
My bad the command is ssh-keygen  i typed wrong on my last post
0
 
LVL 31

Accepted Solution

by:
serialband earned 668 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 31

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

927 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