I got a system where I want to get access via ssh-keys to.

I created an user called monitor and created a file called authorized_keys in /home/monitor/.ssh/ and inserted 2 public keys:

Publickey #1 is from the same host, because I want to use apt-dater; apt-dater tries to connect to localhost (monitor@localhost) with ssh-key. This does not work (asks for password)

Publickey #2 is from a remote host; the user "monitor" should connect to this host to check load and stuff.

Both public keys do not work; I can not connect from the same host (ssh monitor@localhost or from the other server with ssh monitor@example.com).

Error: debug1: Roaming not allowed by server

What can I do here?


The message Error: debug1: Roaming not allowed by server is only a debug message, not more.

Follow the steps below to authenticate via public key:

On your server enable the password authentication. Open the ssh-server configuration

 sudo nano /etc/ssh/sshd_config

and enable the password authentication

PasswordAuthentication yes

Reload the configuration

sudo service ssh reload

On your client

Copy your public key via ssh-copy-id

ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 user@server 

or as alternative

cat id_rsa.pub | ssh server cat >> ~/.ssh/authorized_keys 

On your server

sudo nano /etc/ssh/sshd_config

and disable the password authentication

PasswordAuthentication no

Reload the configuration

sudo service ssh reload
  • To avoid a pitfall like this in the future try looking at the variable $? Which if not 0 (according to standards) means the previous command failed Jun 20 '15 at 15:02
  • @MyFault Were you satisfied with my answer? Then give me an upvote (∧). If I could solve your problem, then it would be nice if you'd mark my answer (✓). askubuntu.com/help/someone-answers ;)
    – A.B.
    Jun 20 '15 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.