SSH keys

Status
Not open for further replies.

thijsjek

Dabbler
Joined
Aug 12, 2017
Messages
19
I am trying to set up ssh keys for security and learn how to do it on FreeNAS-11.0-U4

What did i do so far:
Made on my windows machine with puttygen a public and private key (with auth) and called it id_rsa.ppk.
FreeNAS GUI, i have a user with sudo permissions, a home directory and i pasted the public key without ---- BEGIN SSH2 PUBLIC KEY ---- etc.
Sanity checked ~.shh/authorized_keys so that its 1 row [edit]
disabled password login and started ssh service.
Putty: selected the .ppk and connected to server.

Problem:
when i connect with putty i get the fatalerror:
Disconnected: No supported authentication methods available (server sent: publickey)

Logs:
tail -f /var/log/messages
Code:
Freenas sshd[17271]: error: Received disconnect from xx.xx.xx.27 port 53203:14: No supported authentication methods available [preauth]

tail -f /var/log/auth.log
Code:
Oct  9 12:16:30 Freenas sshd[10801]: Server listening on :: port 22.
Oct  9 12:16:30 Freenas sshd[10801]: Server listening on 0.0.0.0 port 22.
Oct  9 12:16:32 Freenas sshd[17271]: error: Received disconnect from xx.xx.xx.27 port 53203:14: No supported authentication methods available [preauth]
Oct  9 12:16:32 Freenas sshd[17271]: Disconnected from xx.xx.xx.27 port 53203 [preauth]


Permissions:
Code:
homedirectory itself:
drwx------   3 user user  3 Oct  9 09:59 User
Inside home directory:
drwx------  2 user  user  3 Oct  9 09:59 .ssh
File:
-rw-------  1 user  user 373 Oct  9 11:23 authorized_keys
 
Last edited by a moderator:

thijsjek

Dabbler
Joined
Aug 12, 2017
Messages
19
What happens if you do nano -w .ssh/authorized_keys? Because that public key should all be on one line.
Thank you for correcting that issue. But the problem is not yet solved. Tailing the log files gives the same errors back.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
The OpenSSH allowed authentication methods changed recently. Some older auth methods were disabled. Make sure you are using the most recent version of PuTTY, and the docs for it on how to enable or use newer authentication methods.
 

thijsjek

Dabbler
Joined
Aug 12, 2017
Messages
19
The OpenSSH allowed authentication methods changed recently. Some older auth methods were disabled. Make sure you are using the most recent version of PuTTY, and the docs for it on how to enable or use newer authentication methods.
I used a RSA2048 key, also tried now a newer ed25519 key with and without password. same problem, so i guess its not clients side but server side.
 
Status
Not open for further replies.
Top