小编jac*_*raz的帖子

ssh 连接被拒绝

嗨,我的 ssh 有问题,它神奇地停止工作,我不知道为什么。它给出的信息是:

ssh: connect to host <host> port 22: Connection refused
Run Code Online (Sandbox Code Playgroud)

我在写作时没有看到任何错误消息,dmesg但我正在关注telnet localhost 22

Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Run Code Online (Sandbox Code Playgroud)

我尝试了在一些类似情况下看到的解决方案[1][2]但它仍然没有解决我的问题,条目和输出如下:

>> sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
>> sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot …
Run Code Online (Sandbox Code Playgroud)

server ssh firewall networking

8
推荐指数
2
解决办法
13万
查看次数

标签 统计

firewall ×1

networking ×1

server ×1

ssh ×1