Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to rsync without password on Ubuntu 12.04.4 LTS

Posted on 2014-04-03
8
Medium Priority
?
923 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 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 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 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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

721 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