无法无密码登录到 FreeNAS

Dan*_*Dan 5 ssh unix freebsd freenas permissions

我正在尝试使用此命令允许我无密码登录到 FreeNAS 设备:

cat ~/.ssh/id_rsa.pub | ssh root@server.com 'cat >> ~/.ssh/authorized_keys'
Run Code Online (Sandbox Code Playgroud)

但我得到:

/root/.ssh/authorized_keys: Read-only file system.
Run Code Online (Sandbox Code Playgroud)

如果我以 身份登录到 box root,那么ls ~/.ssh我会看到

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
Run Code Online (Sandbox Code Playgroud)

如果ls ~我看到

drwx------   2 root  wheel   512 Aug 22 18:34 .ssh/
Run Code Online (Sandbox Code Playgroud)

我错过了什么?为什么我不能向 known_hosts 添加条目?

小智 7

登录到您的 FreeNas 机器并打开终端输入:

mount -o rw /
Run Code Online (Sandbox Code Playgroud)

完成后输入

mount -o ro /
Run Code Online (Sandbox Code Playgroud)