![我如何让 ssh 开始工作?](https://linux22.com/image/1188432/%E6%88%91%E5%A6%82%E4%BD%95%E8%AE%A9%20ssh%20%E5%BC%80%E5%A7%8B%E5%B7%A5%E4%BD%9C%EF%BC%9F.png)
我将一台闲置的笔记本电脑变成了 Ubuntu 服务器,一切都运行良好。我通过 Windows 10 电脑上的 ssh 连接到它,并能够设置和访问 Nextcloud 来上传我的所有文件。当天晚些时候,我去上传更多文件,但无法通过 URL 访问 Nextcloud,因此我尝试通过 ssh 进入服务器,它显示,
ssh: connect to host 192.168.1.82 port 22: Connection timed out
然后我 ping 了该 IP,它显示的内容如下。
Pinging 192.168.1.82 with 32 bytes of data:
Reply from 192.168.1.105: Destination host unreachable.
Reply from 192.168.1.105: Destination host unreachable.
Reply from 192.168.1.105: Destination host unreachable.
Reply from 192.168.1.105: Destination host unreachable.
Ping statistics for 192.168.1.82:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
(.82 是我的服务器,.105 是我的 Windows 电脑)
我是 Linux 新手,我决定设置一个 Ubuntu 服务器来帮助学习使用,但经过几个小时的搜索,我找不到任何有帮助的东西。
我将 IP 设置为静态,ssh 127.0.0.1
一切运行正常。我禁用了服务器上的防火墙,看看是否有帮助,但仍然没有运气。
这是我的路由器上有关服务器的详细信息的图片。IP 设置为静态,但由于某种原因,它显示状态为关闭。我不确定这是什么意思,也不知道该如何修复。
这是ipconfig
我的 Windows 电脑上的。
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : attlocal.net
IPv6 Address. . . . . . . . . . . : 2600:1700:eef1:8500::732
IPv6 Address. . . . . . . . . . . : 2600:1700:eef1:8500:f872:b6be:1554:daea
Temporary IPv6 Address. . . . . . : 2600:1700:eef1:8500:68b0:5914:b408:55e5
Link-local IPv6 Address . . . . . : fe80::f872:b6be:1554:daea%4
IPv4 Address. . . . . . . . . . . : 192.168.1.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::3a3b:c8ff:fe26:7dcd%4
192.168.1.254
home_server@homeserver:~$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:d0:d2:0d:bb txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 85454 bytes 6965740 (6.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 85454 bytes 6965740 (6.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wls8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.82 netmask 255.255.255.0 broadcast 192.168.1.255
ether 84:ef:18:b4:4c:fe txqueuelen 1000 (Ethernet)
RX packets 27285 bytes 3338490 (3.3 MB)
RX errors 0 dropped 5750 overruns 0 frame 0
TX packets 59891 bytes 13749849 (13.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0