好久没上博客了,最近由于使用树莓派,就在网上买了一块树莓派3b的板子来折腾,在这个过程中,遇到了一些问题,这些问题既浪费时间又不是啥技术问题,很是浪费时间,所以我在这里贴出我遇到的这几个问题,希望能给有需要的朋友提供些许便利。
1、打开putty出现的问题
raspbery pi 连接putty出现:connect refused or connect time out.首先打开sudo raspi-config 出现interfacing Options 选择Select 然后OK就行了.
the server's host key is not cached in the registry. You have no guarantee the server is the computer you think it is.
the server's ras2 key fingerprint is: ssh-ras 2048 84:63:05:1b:f0:89:4e:7c:9a:9b:74:9a:f9:d5:f6 if you trrust this host, hit yes to add the key to PuTT's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, hit NO. If you do not trust this host, hit Cancel to abandon the connection.
2、raspberry pi 连接SSH Secure shell 出现的问题
Server rasponeded "Algorithm negotiation failed".
Key exchange with the remote host failed. This can happen for example. if the remote host computer does not support the selected algorithms.
服务器增加了“算法协商失败”。
与远程主机的密钥交换失败。 例如,这可能发生。 如果远程主机不支持所选算法。
解决办法:
在raspberry pi 中通过 sudo vim /etc/ssh/sshd_config 打开sshd_config配置文件,添加以下各个系统的密匙算法:
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org
重启sshd服务后,可正常连接。
重启命令:sudo service ssh restart
3、再次登录SSH Service shell时(已更改配置文件sshd_config)后,出现you are connecting to the host "172.20.10.4" for the first time. The host has provided you its identification, a host public key.
The fingerprint of the host public key is:
"xefer-fakab-rofot-bumup-ranar-dinir-nirih-zygub-pefav-fuzik-raxy
You can save th host key to the local database by clicking Yes.You can continue without saving the host key by clicking No.You can also cancel the connection by clicking Cancle.
Do you want to save the new host key to the local database?
解决办法:将主机的公钥的指纹记录下来保存就OK了。这是sshd_config中你更改后的密匙算法为你分配的指纹(据我推测,不太确定哦)。