rsync error while transfering data from one server to another

12,676

If not already done, you have to ensure that root loging via SSH on 192.168.151.123 is permitted. Root login is denied by default. Secondly, you have to set a root password, which is also not set by default.

Permit root login:

--- ./sshd_config_2014-10-12    2014-10-21 15:00:24.354489498 +0200
+++ /etc/ssh/sshd_config    2014-10-21 15:03:03.925036747 +0200
@@ -24,7 +24,7 @@

 # Authentication:
 LoginGraceTime 120
-PermitRootLogin without-password
+PermitRootLogin yes
 StrictModes yes

 RSAAuthentication yes

Restart ssh service:

 sudo service ssh restart

Set root password:

 sudo passwd
Share:
12,676

Related videos on Youtube

Sandeep.B
Author by

Sandeep.B

Updated on September 18, 2022

Comments

  • Sandeep.B
    Sandeep.B over 1 year

    I have 2 ubuntu 14.04 servers in vm in my machine.I logged in the 2 servers as the user chandhu, then by using sudo -i , I changed as root. I have one file in the user chandhu.I wanna to move that from one server to another by using rsync. While I am entering the following command:

    rsync -avh /home/chandhu/me.txt [email protected]:/home/chandhu/
    

    there showing the error. But while I enter the command as this:

    rsync -avh /home/chandhu/me.txt [email protected]:/home/chandhu/
    

    the things are going smoothly. then what was the reason for that error?

    Error message is given below rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]

    • David Foerster
      David Foerster over 9 years
      Welcome to AU! Can you please reproduce the error message in your question so we can see what the issue is? You can edit your question to improve it with more info.
    • Sandeep.B
      Sandeep.B over 9 years
      ofcourse...............................
    • Sandeep.B
      Sandeep.B over 9 years
      rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]
    • Sandeep.B
      Sandeep.B over 9 years
      this is the error while Iam trying copy a file tto another server via rsync
    • David Foerster
      David Foerster over 9 years
      Please edit your question to include that error message so we can have all the relevant info in one place. Also the message is hard to read in comments as they don't support preformatted text sections, but questions (and answers) do.
    • David Foerster
      David Foerster over 9 years
      As explained in an answer, you probably don't have root access over SSH on that server. You can test that with ssh [email protected]. Also I don't understand why you need superuser privileges to synchronise files in chandu's home directory to which that user has full access anyway.
  • Sandeep.B
    Sandeep.B over 9 years
    I know the root password . I entered the root password correctly .. then showing permission denied
  • David Foerster
    David Foerster over 9 years
    There are many risks involved with enabling the root account and allowing remote password authentication to it. You'd be much more secure if you only used certificate based authentication for that purpose.