使用树莓派时遇到的些许问题

本文介绍了在使用树莓派过程中遇到的SSH连接问题,包括Putty连接失败、算法协商失败等,并提供了详细的解决步骤,帮助读者顺利进行树莓派的远程管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

好久没上博客了,最近由于使用树莓派,就在网上买了一块树莓派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中你更改后的密匙算法为你分配的指纹(据我推测,不太确定哦)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值