LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2015, 02:25 PM   #1
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 83

Rep: Reputation: 6
rsync using SSH keys


Hi all,

I have two remote servers which both use the same SSH keys ie don't have a root password. I want to rsync from server #1 to server #2. I am asked for the root password for server #2 (see below) but it does not have a root password.

Any ideas please?

Thanks...

Quote:

orange# rsync -v rsync-test.txt 111.22.33.44:/data/disk/test
The authenticity of host '111.22.33.44 (111.22.33.44)' can't be established.
ECDSA key fingerprint is SHA276:VgSnr0XxTtByYYHuUfAHrvcnFVL2Yk6mb8bKB9JkJ4A.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '111.22.33.44' (ECDSA) to the list of known hosts.
root@111.22.33.44's password:
 
Old 12-24-2015, 03:20 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,360

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Besides the host key, you need to have created an ssh key for the root account (/root/.ssh/id_*) on server #1, and that public key need to be present in /root/.ssh/authorized_keys on server #2.

Last edited by rknichols; 12-24-2015 at 03:21 PM.
 
Old 12-29-2015, 08:57 AM   #3
revanrohit
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
I done this once, i think it never asked me for root password.




-------------------
Gujarat 11th 1st semester result 2015
 
Old 12-29-2015, 10:58 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
rsync just uses the standard ssh keys. Get to the point where you can ssh between the machines without a password and you'll be able to rsync between them as well.

In short - ignore rsync for now, and just focus on getting ssh working. What have you done so far?
 
Old 12-29-2015, 11:01 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
Also, having SSH keys does not mean you don't have a root password, those two things are completely independent and not mutually exclusive. How do you not have a root password? What distro is this?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync servers - ssh keys hua Linux - Security 1 02-28-2011 10:28 PM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 10:48 AM
SSH host keys VS SSH keys kenneho Linux - Security 3 09-11-2008 07:03 AM
RSYNC without keys or passwords prompts? mago Linux - Server 2 06-13-2007 01:55 AM
Configuring SSH to accept only keys (already have keys) fr0st Linux - Security 3 11-04-2003 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration