Solved

How to rsync without password on Ubuntu 12.04.4 LTS

Posted on 2014-04-03
8
886 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 8

Expert Comment

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

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 30

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Suggested Courses

623 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