An error message is reported when connecting to the virtual machine: Could not connect to '192.168.xxx.xxx' (port 22): Connection failed.

Using xshell to connect to a virtual machine reports an error

Connecting to 192.168.204.129:22…
Could not connect to ‘192.168.204.129’ (port 22): Connection failed.

Type `help’ to learn how to use Xshell prompt.

by online method

  • Whether it can ping the internal and external networks
ping www.baidu.com
  • Is the firewall turned off
firewall-cmd --state
  • Restart the ssh service.
systemctl restart sshd.service

problem solved

The problem occurred after I modified the network segment and did not check network adaptation, resulting in no network connection.
insert image description here

Finish! ! !
hy:30


		人要接受自己的有限性,人的逻辑、理性、阅读都是有限的,整个人就是在偏见之中。人这一生就是在走出偏见。

Guess you like

Origin blog.csdn.net/weixin_49107940/article/details/132721453