1

I'm trying to make SSH connection from Windows 10 (using cwrsync) to an Ubuntu server on Digital Ocean.

I configured the RSA keys both on the client side (windows) and on the server side (ubuntu), but when I run the command ssh -v root @ serverIP, the message Roaming not allowed by server appears and then asks me to log in with the password .

Looking on the internet, the staff says that it is to change the permissions of the /root/.ssh folder to 700 and the /root/.ssh/authorized_keys file to 600, but I have already done that and it has not resolved.

If I disable password login in the sshd_config file, I get the following error message when trying to connect via ssh: Permission denied (publickey).

muru
  • 197,895
  • 55
  • 485
  • 740
  • Hard to tell from what you posted. The message about roaming is a red herring and unrelated to your login problem. See https://superuser.com/questions/825634/what-could-roaming-not-allowed-by-server-of-ssh-client-mean . – Panther Oct 09 '17 at 08:25
  • By default , on the Ubuntu server, you can not log into ssh as root via password. How did you configure your Ubuntu ssh server ? How did you make the keys ? How did you transfer the key between the ubuntu server and windows ? – Panther Oct 09 '17 at 08:26
  • On the client side, windows, or cwrsync, whatever that is, you specify the key ssh -i key_name root@server See https://help.ubuntu.com/community/SSH/OpenSSH/Keys – Panther Oct 09 '17 at 08:28
  • There are two different problems: first ssh into the machine as root, second make it password-less using RSA keys. Is the first part working? – user334639 Oct 09 '17 at 08:31
  • Hi, please review this answer. – pa4080 Oct 09 '17 at 09:31
  • @bodhi.zaze, i dont change any config in my ubuntu server, just add my windows public key in the authorized_keys. I make the keys using ssh-keygen. Yes, i transfer the keys; user334639, i ssh into the machine using another user and it gave me the same error, but the first part is working. – Bernardo Kowacic Oct 09 '17 at 11:26
  • I navigated to the folder where the id_rsa file is located on my windows and I ran the ssh -i id_rsa -v user@ip command and did the same thing. I tried to follow the steps of this link: https://help.ubuntu.com/community/SSH/OpenSSH/Keys, but there was nothing I had not already tested :/ – Bernardo Kowacic Oct 09 '17 at 12:07
  • by default ubuntu will not allow you to ssh in as root. See https://askubuntu.com/questions/115151/how-to-set-up-passwordless-ssh-access-for-root-user . You already transferred the key so skip the part about setting a root password (do not set and unset a root password, skip the ssh-copy-id). – Panther Oct 09 '17 at 13:55
  • I created a new key to connect from the root user to another server user and I was able to connect without problems. I will try to replace the key of my windows with the one I created now. – Bernardo Kowacic Oct 09 '17 at 16:41
  • I copied the key I created in the previous test to my windows and tried to connect and it worked. – Bernardo Kowacic Oct 09 '17 at 16:51
  • Can you post the full error file? – Samir Sadek Oct 09 '17 at 17:00

1 Answers1

0

I installed the latest version of openSSH on my windows, deleted the user's .ssh folder and generated a new key, after that I was able to connect to the server using SSH without having to enter a password.