前提:
- 上位机:Ubuntu虚拟机与开发板同局域网
- 开发板:Buildroot文件系统,开启了dropbear,已经联网与虚拟机同局域网
liefyuan@ubuntu:~/tcp-test/tcp-c-client$ scp tcp_client root@192.168.8.199:/opt
root@192.168.8.199's password:
Permission denied, please try again.
root@192.168.8.199's password:
Permission denied, please try again.
root@192.168.8.199's password:
root@192.168.8.199: Permission denied (publickey,password).
lost connection
- 正确的root密码都是不行
从板端找问题
看开发板的Log:
vi /var/log/messages
信息很多,通过/dropbear
找到关键信息:
Jan 1 00:01:38 sololinker authpriv.info dropbear[852]: Child connection from 192.168.8.102:35568
Jan 1 00:01:38 sololinker authpriv.info dropbear[852]: Generated hostkey /etc/dropbear/dropbear_ecdsa_host_key, fingerprint is SHA256:wqvp9uakxG
Jan 1 00:01:41 sololinker authpriv.info dropbear[852]: /root must be owned by user or root, and not writable by group or others
Jan 1 00:01:45 sololinker authpriv.warn dropbear[852]: User account 'root' is locked
Jan 1 00:01:50 sololinker authpriv.warn dropbear[852]: User account 'root' is locked
Jan 1 00:01:52 sololinker authpriv.warn dropbear[852]: User account 'root' is locked
Jan 1 00:01:53 sololinker authpriv.info dropbear[852]: Exit before auth from <192.168.8.102:35568>: (user 'root', 3 fails): Exited normally
Jan 1 00:02:22 sololinker authpriv.info dropbear[1021]: Child connection from 192.168.8.102:58946
Jan 1 00:02:22 sololinker authpriv.info dropbear[1021]: /root must be owned by user or root, and not writable by group or others
Jan 1 00:02:27 sololinker authpriv.warn dropbear[1021]: User account 'root' is locked
Jan 1 00:03:47 sololinker authpriv.warn dropbear[1021]: User account 'root' is locked
Jan 1 00:03:50 sololinker authpriv.warn dropbear[1021]: User account 'root' is locked
神奇!User account 'root' is locked
解决办法,使用命令:passwd root
来修改一下密码就可以了。