You are not logged in.

#1 2014-08-16 13:56:42

miktore
Member
Registered: 2014-01-26
Posts: 16

[SOLVED] How to rsync with sudo needed to a destination in LAN

I need to do a full backup as demonstrated here but the destination is another machine on my LAN, I already did many rsync operations without password needed over LAN but I never needed sudo rsync before. Now this full backup operation clearly requires root so I added my source root key into the destination's ~/.ssh/authorized_keys, as this method worked well when I needed to rsync without password from my user1@src to user2@dest. Now what appears when I use sudo rsync....

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
c1:bc:80:c2:1e:40:61:f0:4f:b2:70:68:6b:c5:de:04.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
ECDSA host key for 192.168.1.2 has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]

What should I do?

Last edited by miktore (2014-08-16 15:51:43)

Offline

#2 2014-08-16 14:22:38

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [SOLVED] How to rsync with sudo needed to a destination in LAN

miktore wrote:

What should I do?

Well, I would assume that since you have a fingerprint listed (c1:bc:80:c2:1e:40:61:f0:4f:b2:70:68:6b:c5:de:04), you should check your key.

Offline

#3 2014-08-16 15:51:12

miktore
Member
Registered: 2014-01-26
Posts: 16

Re: [SOLVED] How to rsync with sudo needed to a destination in LAN

@Buddlespit Tank you for the reply, I found the solution by deleting the /root/.ssh/known_hosts file in my src machine, it now works!

Offline

Board footer

Powered by FluxBB