➜ ~ ssh pi@192.168.50.86 The authenticity of host '192.168.50.86 (192.168.50.86)' can't be established. ECDSA key fingerprint is SHA256:yDNyMxc152SYJHpzidqaVtxMEVbx1NpIKAfw8GP+8Jc. Are you sure you want tocontinue connecting (yes/no)? yes Warning: Permanently added '192.168.50.86' (ECDSA) to the list of known hosts. pi@192.168.50.86's password: Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 2912:19:23 GMT 2017 armv7l
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms foreach program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi@raspberrypi:~ $ pi@raspberrypi:~ $
重置密码
pi@raspberrypi:~ $ sudo passwd pi Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
无密码登录
我一向不稀罕用密码登录,因为一麻烦 二不安全
➜ ~ ssh-copy-idpi@192.168.50.86 /usr/local/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/wenjun/.ssh/id_rsa.pub" /usr/local/bin/ssh-copy-id: INFO: attempting tologinwiththe new key(s), to filter out any that are already installed /usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys pi@192.168.50.86's password:
Number of key(s) added: 1
Now try logging intothe machine, with: "ssh 'pi@192.168.50.86'" and check to make sure that only the key(s) you wanted were added.
➜ ~
➜ ~ ssh pi@192.168.50.86 Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Dec 9 02:35:21 2017 from 192.168.50.32 pi@raspberrypi:~ $