32

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?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Ashish Agarwal
  • 14,027
  • 31
  • 84
  • 123

3 Answers3

53

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.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Dan D.
  • 70,581
  • 13
  • 96
  • 116
9

Make sure the SSHD is running, looks like it is not.

Try

service sshd start

I am not familiar with ubuntu, but this should work.

ChrisBint
  • 12,658
  • 6
  • 36
  • 56
  • 2
    In Ubuntu **service ssh status** shows the ssh's status. If not started, then **service ssh start** helps. – Jeyaram Jul 18 '12 at 11:49
0

Bonus if you need to start the X server you run this:

 ssh -x <host>
chriz
  • 1,560
  • 19
  • 27
juanca
  • 353
  • 1
  • 9