树莓派SSH远程连接失败的解决办法

将全新的树莓派系统烧录,开机然后用SSH远程连接,结果SSH连接提示“connection refused”,导致连接树莓派失败。出现错误的原因是自 2016-11-25 官方发布的新系统镜像,系统默认禁用了 SSH 服务。 

ssh: connect to host 192.168.43.220 port 22: Connection refused

官方的解决方案是: 

As of the November 2016 release, Raspbian has the SSH server disabled by default. 
SSH disabled by default; can be enabled by creating a file with name “ssh” in boot partition 

 

插入SD卡,在boot分区新建一个ssh的空文件,没有后缀。

有些同学新建的ssh,其实是ssh.txt,导致ssh服务还是没启动。

可以通过windows命令行新建文件

// 进入boot分区,假设在e盘
e:
// 创建ssh空文件,没有后缀
// nul不要写成null
type nul > ssh

发布了758 篇原创文章 · 获赞 35 · 访问量 60万+

猜你喜欢

转载自blog.csdn.net/kelsel/article/details/99701149