Unable to do passwordless login to FreeNAS
Solution 1
Login to your FreeNas Machine and open the Terminal enter:
mount -o rw /
when done enter
mount -o ro /
Solution 2
In current version (9.2.1.8) this is very straight forward to achieve:
- Log in to the Web GUI.
- Navigate to Account > Users > View Users
- Double click on user root.
- In the open dialog box there is an "SSH Public Key" field. Copy and paste the content of
/root/.ssh/id_rsa.pub
on the Admin node and Save the configuration.
If there is no id_rsa.pub copy the content of
/etc/ssh/ssh_host_rsa_key.pub
instead.
Solution 3
You have to enable "root" login from the FreeNAS GUI if you want to use the "root" user over ssh. (which in the ssh best practice config, is DON'T DO IT). I use my user to ssh in to the FreeNAS and Then "su" up to the root user. Or you can allow your user sudo access.
http://doc.freenas.org/index.php/SSH & http://doc.freenas.org/index.php/Users
Related videos on Youtube
Dan
Updated on September 18, 2022Comments
-
Dan over 1 year
I'm trying to use this command to allow me passwordless login to a FreeNAS box:
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'
But I get:
/root/.ssh/authorized_keys: Read-only file system.
If I log in to box as
root
, thenls ~/.ssh
I seedrwx------ 2 root wheel 512 Aug 22 18:34 ./ drwxr-xr-x 3 root wheel 512 Sep 1 19:16 ../ -rw-r--r-- 1 root wheel 806 Aug 22 18:39 authorized_keys -rw------- 1 root wheel 1675 Aug 18 21:50 id_rsa -rw-r--r-- 1 root wheel 400 Aug 22 18:34 known_hosts
And if I
ls ~
I seedrwx------ 2 root wheel 512 Aug 22 18:34 .ssh/
What am I missing? Why can't I add an entry to known_hosts?