Arch: sshd – authorized_keys

Debugging: No supported authentication methods available

# systemctl stop sshd && systemctl disable sshd
# /usr/bin/sshd -d

If you want to use your public keyfile from puttygen in the ssh-authorized_keys file you are looking for trouble.

[root@tsa]# /usr/bin/sshd -d
debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1l 15 Jan 2015
...
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.    
Failed publickey for root from 192.168.1.100 port 49393 ssh2: RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
Received disconnect from 192.168.1.100: 14: No supported authentication methods available [preauth]
...
debug1: do_cleanup
debug1: Killing privsep child 9921

Here is the reason

# cat .ssh/authorized_keys
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20150125"
AAAAB3NzaC1yc2EAAAABJQAAAQEAsKx3JfVH3D9aMdKTlwmsG6osXs3WN/aGXcAD
zKw0Wy8Bbou+/VWwXL+TR0IGIFoTSN6KYpw0K4bUCQWopdWlQAbV4+roe7gHcxzm
HLLPQDQvqAt7FZsv5u666/DDzpGbwwGniOARdBPEyWhVkKx1r5DE6jyDVNBgSDWh
eAXicW43ytbIZHx+xMcCb6zQ2U08UiOw8oUW6N2mUKJ/Shgk19WM4DqsHl8Yq8P5
61g109b2OdLJQw4MoKdjvJZFkf+g170goUo/mT8HesEYlEIHSpliwWLmb+kqv0lI
neYanV9cxiqKmeFxs4UgomCURobxGx3p2iNtaCHmRNTJHvIeSQ==
---- END SSH2 PUBLIC KEY ----

This is a no-go – not usable – authorized_keys does not contain LF. Copy/paste from inside puttygen to ssh-authorized_keys

# cat .ssh/autorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAsKx3JfVH3D9aMdKTlwmsG6osXs3WN/aGXcADzKw0Wy8Bbou+/VWwXL+TR0IGIFoTSN6KYpw0K4bUCQWopdWlQAbV4+roe7gHcxzmHLLPQDQvqAt7FZsv5u666/DDzpGbwwGniOARdBPEyWhVkKx1r5DE6jyDVNBgSDWheAXicW43ytbIZHx+xMcCb6zQ2U08UiOw8oUW6N2mUKJ/Shgk19WM4DqsHl8Yq8P561g109b2OdLJQw4MoKdjvJZFkf+g170goUo/mT8HesEYlEIHSpliwWLmb+kqv0lIneYanV9cxiqKmeFxs4UgomCURobxGx3p2iNtaCHmRNTJHvIeSQ== rsa-key-20150125

Output from /usr/bin/sshd -d

[root@tsa]# /usr/bin/sshd -d
debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1l 15 Jan 2015
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
...
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 1 RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
...
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 1 RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
debug1: restore_uid: 0/0
Accepted publickey for root from 192.168.1.100 port 49421 ssh2: RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
debug1: monitor_child_preauth: root has been authenticated by privileged process
...
Starting session: shell on pts/1 for fh from 192.168.1.100 port 49421
...
Closing connection to 192.168.1.100 port 49421

That’s better

# systemctl start sshd && systemctl enable sshd