![无法设置 ssh(dropbear) 密钥登录](https://linux22.com/image/793766/%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AE%20ssh(dropbear)%20%E5%AF%86%E9%92%A5%E7%99%BB%E5%BD%95.png)
Dropbear 配置是/etc/config/dropbear
:
config dropbear
option Port '22'
option Interface 'lan'
option RootPasswordAuth 'off'
option PasswordAuth 'on'
我已将我的公共 ssh 密钥粘贴到/etc/dropbear/authorized_keys
和中/home/miuser/.ssh/authorized_keys
。
但当我尝试连接时
~$ ssh -o PasswordAuthentication=no -i ~/path/to/secret/key [email protected]
[email protected]: Permission denied (publickey,password).
但是对用户的密码验证是miuser
有效的。root
使用密钥对用户进行验证也有效,但对用户无效miuser
。
权限是
/home/miuser:
.:
drwxr-xr-x 3 root root 224 Mar 22 16:25 .
drwxr-xr-x 3 root root 224 Mar 22 15:05 ..
drwx--x--x 2 miuser miuser 232 Mar 22 16:25 .ssh
/home/miuser/.ssh:
drwx--x--x 2 miuser miuser 232 Mar 22 16:25 .
drwxr-xr-x 3 root root 224 Mar 22 16:25 ..
-rw------- 1 miuser miuser 1362 Mar 22 16:37 authorized_keys
/etc/dropbear/:
drwx------ 1 root root 400 Mar 22 16:11 .
drwxr-xr-x 1 root root 2176 Mar 22 15:16 ..
-rw------- 1 root root 734 Mar 22 16:37 authorized_keys
/etc/config/dropbear:
-rw------- 1 root root 117 Mar 22 16:20 /etc/config/dropbear