FreeNAS 8 password-less ssh settup

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
This post if for those having trouble using password-less ssh with FreeNAS 8.

While trying to setup password-less ssh for a non-root user on FreeNAS 8 I was still being prompted for the password. I now know that it was likely a bad known_hosts file on my client computer


From my ubuntu client
$ssh -v -i ~/.ssh/id_rsa 'user@freenas'
...
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/joshua/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/joshua/.ssh/id_dsa
debug1: Trying private key: /home/joshua/.ssh/id_ecdsa
debug1: Next authentication method: password

At this point I get a password promt, what I was trying to avoid.


These steps will give you a clean slate for password-less ssh and should not be used if you have ssh keys setup that you don't want to lost.
1. Clean client's .ssh folder (on ubuntu)
$rm ~/.ssh/*

2. Clean FreeNAS user's .ssh folder (on FreeNAS)
$rm -r ~/.ssh

3. Creat new Private/Public Keys (on ubuntu)
$ssh-keygen -t rsa

4. Send FreeNAS Public Key (on ubuntu)
$ssh-copy-id user@freenas

4. Now test with ssh (on ubuntu)
$ssh 'user@freenas'

I hope this helps anyone who was getting my double authentication error, please reply if you have any questions
 
Status
Not open for further replies.
Top