简体   繁体   English

升级到 Jessie 后无法通过主机名 ssh 到 raspberry pi

[英]Cannot ssh to raspberry pi through hostname after upgrading to Jessie

For a long time, as long as I connect my Mac and RP directly using a single cable (with or without any other devices like monitor or keyboards connected), I can ssh to my RP using command长期以来,只要我使用一根电缆直接连接我的 Mac 和 RP(连接或不连接任何其他设备,如显示器或键盘),我就可以使用命令 ssh 到我的 RP

ssh pi@raspberrypi.local

Yesterday, I upgraded to Jessie, then strange thing happens:昨天,我升级到 Jessie,然后奇怪的事情发生了:

  • If the monitor is connected (through HDMI) when booting the RP如果在启动 RP 时连接了显示器(通过 HDMI)
    • If my mac is connected to a Wifi, the ssh will FAIL!如果我的 mac 连接到 Wifi,ssh 将失败! However, if I immediately re-ssh again, it will succeed!但是,如果我立即重新 ssh 一次,就会成功!
    • If my mac is not connected to other networks, the ssh will succeed.如果我的mac没有连接到其他网络,ssh就会成功。
  • If the monitor is not connected when booting, I can NOT ssh through hostname.如果启动时显示器未连接,我无法通过主机名 ssh。
  • In both case the RP is not connected to any wifi or other networks.在这两种情况下,RP 都没有连接到任何 wifi 或其他网络。

Neither before of after upgrading have I modified any system configuration.在升级之前和之后我都没有修改任何系统配置。

Could anyone help?有人可以帮忙吗? Particularly, I am wondering how does connecting a monitor through HDMI affect ssh connection?!特别是,我想知道通过 HDMI 连接显示器如何影响 ssh 连接?!

You could ssh manually to the pi's local ip address instead.您可以改为手动 ssh 到 pi 的本地 IP 地址。 You can view its ip in your router settings when it's connected then run ssh pi@xxx.xxx.xxx.连接后,您可以在路由器设置中查看其 ip,然后运行 ​​ssh pi@xxx.xxx.xxx。 Hope this helps希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM