Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use this command to allow me passwordless login to a FreeNAS box:

cat ~/.ssh/ | ssh 'cat >> ~/.ssh/authorized_keys'

But I get:

/root/.ssh/authorized_keys: Read-only file system.

If I log in to box as root, then ls ~/.ssh I see

drwx------  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 see

drwx------   2 root  wheel   512 Aug 22 18:34 .ssh/

What am I missing? Why can't I add an entry to known_hosts?

share|improve this question
I guess your device's filesystem is read-only, just like the error says. What type of filesystem is it? What's the underlying device (likely an mtdblock device)? – Celada Feb 6 '13 at 2:01
As a side-note, I'd recommend using ssh-copy-id to copy the key if possible. – Cristian Ciupitu Jun 15 '14 at 4:01

Login to your FreeNas Machine and open the Terminal enter:

mount -o rw /

when done enter

mount -o ro /
share|improve this answer

In current version ( this is very straight forward to achieve:

  1. Log in to the Web GUI.
  2. Navigate to Account > Users > View Users
  3. Double click on user root.
  4. In the open dialog box there is an "SSH Public Key" field. Copy and paste the content of


on the Admin node and Save the configuration.

If there is no copy the content of



share|improve this answer

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. &

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .