P
P
Pavel2014-04-27 15:16:00
linux
Pavel, 2014-04-27 15:16:00

Authorization by SSH keys. Doesn't let you in as root

Decided to try authorization by keys. Public key threw in /.ssh/authorized_keys
Trying to log in as root, getting Server refused our key
Here are the ssh logs:
Apr 27 12:00:03 localhost sshd[3737]: debug1: Client protocol version 2.0; client software version PuTTY_Release_0.63
Apr 27 12:00:03 localhost sshd[3737]: debug1: no match: PuTTY_Release_0.63
Apr 27 12:00:03 localhost sshd[3737]: debug1: Enabling compatibility mode for protocol 2.0
Apr 27 12:00:03 localhost sshd[3737]: debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze5
Apr 27 12:00:05 localhost sshd[3737]: Invalid user \320root from 5.76.102.81
Apr 27 12:00:05 localhost sshd[3737]: debug1: PAM: initializing for "\320root"
Apr 27 12:00:05 localhost sshd[3737]: debug1: PAM: setting PAM_RHOST to "MYIP"
Apr 27 12:00:05 localhost sshd[3737]: debug1: PAM: setting PAM_TTY to "ssh"
Apr 27 12: 00:05 localhost sshd[3737]: Failed none for invalid user \320root from MYIP port 64160 ssh2 I log in normally
under another user. Rights set correctly

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ingtar, 2014-04-27
@Ingg

There was a similar problem - try not to copy the public key with your hands, but ssh copy id.

A
Alexander Karabanov, 2014-04-27
@karabanov

invalid user \320root really doesn't tell you anything?

S
Stepan, 2014-04-27
@L3n1n

Public key uploaded /.ssh/authorized_keys

It is necessary to throw in the user's folder. That is ~/.ssh/authorized_keys
Go as root, create a file ~/.ssh/authorized_keys and try to login.

V
Vlad Zhivotnev, 2014-04-28
@inkvizitor68sl

You probably got an extra space in your username during authorization.
The root public key (and check that it is the public key and not its private part) must be placed in the /root/.ssh/authorized_keys file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question