Solved

How to rsync without password on Ubuntu 12.04.4 LTS

Posted on 2014-04-03
8
801 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 8

Expert Comment

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

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 28

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How yum repo uses sqlite3 to keep metadata about the repository? 2 32
Linux script delete files 3 29
number in printf 13 27
linux 13 42
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

813 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

17 Experts available now in Live!

Get 1:1 Help Now