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,738
  • 21
  • 105
  • 131
Ashish Agarwal
  • 14,555
  • 31
  • 86
  • 125

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,738
  • 21
  • 105
  • 131
Dan D.
  • 73,243
  • 15
  • 104
  • 123
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,773
  • 6
  • 40
  • 62
  • 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,580
  • 19
  • 27
juanca
  • 353
  • 1
  • 9