Cannot ssh to localhost [closed]

Posted on May 28, 2023

Question

I am trying to see if ssh is properly configured on Ubuntu 11.04:

  ashish@ubuntu:~$ ssh localhost
  ssh: connect to host localhost port 22: Connection refused
  ashish@ubuntu:~$

What do I do from here?

Answer

Try:

sudo apt-get install openssh-server

It's most likely that the ssh server is not installed as only the client is installed by default.