[Solved] Connect to Ubuntu Error Via xshell: Could not connect to ‘xxxxx’ (port 22)

Unable to connect to XXX when connecting to Ubuntu with xshell

At first, I thought it was a port problem. So port 22 was opened

firewall-cmd --zone=public --add-port=22/tcp --permanent

Then it still reports an error when it is used again.

zheng@ubuntu:~$ ps -e|grep ssh

  5548 ?       00:00:00 ssh-agent


The query is with an agent's end



So you need to install the server side
sudo apt-get install openssh-server

Next, check again
zheng@ubuntu:~$ ps -e|grep ssh
  5548 ?       00:00:00 ssh-agent
  9744 ?       00:00:00 sshd


That'll do it!

Later, I found that it was because I didn’t install the server side of SSH.

Similar Posts: