0

I can't exchange files between my pcs, when I give the command sudo rsync -av -delete --rsh=ssh localhost/directory remotehost/directory remotehost root password is required but when I type it the output is this: root@remotehost's password: Permission denied, please try again.

I don't know what's wrong, I type the exact password that I use when I type su (on the remotehost)

Please Help me

Edit: If I use a specific user (user@remotehost) I can transfer files, but I still haven't figured out why using root@remotehost doesn't work

1 Answer 1

1

You said you enter your local root password (the one you use for su). However, you show in your provided output that you are being asked for the remote root password.

root@remotehost's password:
Permission denied, please try again.

Make sure you enter the root password for remotehost. If that fails, try running a

sudo ssh remotehost

And make sure that the ssh connection can open, before trying to run rsync through it. Maybe you need to tell it to accept a certificate first.

Conclusion

The inquisitor is running Linux Mint which disabled root user by default. Making a root user so that a "user@remotehost" exists is sufficient to get the rsync command working. http://www.shellhacks.com/en/HowTo-Create-USER-with-ROOT-Privileges-in-Linux

6
  • 1
    Also worth noting, most installs these days disable root login, at least remotely. Try using a regular user account, not root. Commented Feb 8, 2016 at 14:53
  • You are right maybe I should have specified that when the root password for remotehost is asked what I type is remotehost root password
    – OverMorrow
    Commented Feb 8, 2016 at 15:29
  • 1
    Ensure you can ssh to the remote root user. ssh root@remotehost. It is possible the PermitRootLogin option is set to no in the sshd_config file. Check /etc/ssh/sshd_config on the remote host.
    – bgStack15
    Commented Feb 8, 2016 at 15:48
  • I think I have figured out what's going on, read what I write and tell if what I say is wrong. I have linux mint installed on both the machine, but mint as default behaviour doesn't create root user, but instead only gives a user (thought su command) root privileges, if this is right what I have to do is to create a root user then I should be done
    – OverMorrow
    Commented Feb 8, 2016 at 15:55
  • 1
    Yes, if you are certain you are ready to make a root user. Remember that there are reasons the packagers of Linux Mint decided to disable a root user. Rsyncing as root is not the best design ever, but here you go: shellhacks.com/en/…
    – bgStack15
    Commented Feb 8, 2016 at 16:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .