简体   繁体   English

通过以太网的Raspberry Pi SSH连接失败

[英]Raspberry Pi SSH connection over Ethernet fails

I'm trying to establish a connection over SSH from my Win 8.1 laptop to my raspberry pi 3 model B as the host. 我正在尝试通过SSH从Win 8.1笔记本电脑建立到树莓派pi 3模型B作为主机的连接。 Connecting over wifi works flawlessly each time, however I need to demo projects in class and the campus wifi does not play well with SSH, our professor stated that we must use an Ethernet connection. 每次通过wifi进行连接都可以正常工作,但是我需要在课堂上演示项目,并且校园wifi不能很好地与SSH配合使用,我们的教授表示必须使用以太网连接。 I have tried both putty and Bitvise SSH clients with same results - either "connection refused" or "no connection could be made because the machine actively refused it". 我尝试过腻子和Bitvise SSH客户端,结果均相同-“连接被拒绝”或“由于计算机主动拒绝连接而无法建立连接”。

I have tried: 我努力了:

  • Enabling internet sharing on the Ethernet connection and enabling the SSH services (port 22 both TCP and UDP) 在以太网连接上启用Internet共享并启用SSH服务(端口22,TCP和UDP)
  • Disabling wifi on Win 在Win上禁用wifi
  • Forgetting wifi on raspberry 忘记树莓上的wifi
  • Manually activating SSH server on raspberry even though I'm pretty sure it was activated already. 即使我确定它已经被激活,也可以在树莓派上手动激活SSH服务器。
  • Deleting SSH keys from the wifi sessions 从wifi会话中删除SSH密钥
  • Completely disabling the firewall 完全禁用防火墙
  • ipconfig /release ipconfig /renew ipconfig /release ipconfig /renew
  • Restarting both machines after every of the above 完成上述所有操作后重新启动两台计算机
  • Reimaging memory card with newest Raspbian 使用最新的Raspbian重新成像存储卡

Any help would be greatly appreciated. 任何帮助将不胜感激。

Edit: The link What can be the reasons of connection refused errors? 编辑:链接连接被拒绝错误的原因是什么? did not help, the listed reasons are closed ports or firewall and as I already said I tried to open the required ports through the shared Ethernet connection and turned off Windows firewall completely with no other firewall programs running. 没有帮助,列出的原因是关闭的端口或防火墙,并且正如我已经说过的,我试图通过共享的以太网连接打开所需的端口,并在没有其他防火墙程序运行的情况下完全关闭了Windows防火墙。 From my understanding Raspbian doesn't come with any enabled firewalls and allows all traffic. 据我了解,Raspbian没有附带任何启用的防火墙,并允许所有流量。 Can someone correct me if I'm wrong? 如果我错了,有人可以纠正我吗?

I finally found a guide that works: http://www.circuitbasics.com/how-to-connect-to-a-raspberry-pi-directly-with-an-ethernet-cable/ 我终于找到了一个有效的指南: http : //www.circuitbasics.com/how-to-connect-to-a-raspberry-pi-direct-with-an-ethernet-cable/

The crucial step was to set the static IP address of the pi to my laptop's Ethernet adapter address but modify the last part. 关键步骤是将pi的静态IP地址设置为笔记本电脑的以太网适配器地址,但要修改最后一部分。 You're welcome, all you poor souls from the future. 不客气,所有来自未来的可怜人。

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

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