0

I've tried to access the Ubuntu platform using SSH, SCP, and SFTP and got refused with a message. I tried service ssh restart and got:

ssh:unrecognized service

I also typed sudo ufw disable in order to disable the firewall, but it still did not let me in. How can I fix this?

Peter Mortensen
  • 933
  • 2
  • 11
  • 17
avis
  • 1
  • 1
    Have you installed `openssh` ? – hg8 Dec 03 '15 at 15:22
  • Check list of SSH packages by running `dpkg-query -W | grep ssh` in Terminal. Default installation should have `openssh-client`. But, you will need `openssh-server` also. –  Dec 03 '15 at 16:13

2 Answers2

3

Chances are you don't have ssh server installed. Use this to install it:

sudo apt-get install openssh-server

To check if it is running:

sudo service ssh status

Try that and see if you can connect to it.

hg8
  • 13,410
  • 12
  • 71
  • 103
G Trawo
  • 1,751
  • 13
  • 13
  • Thanks it works . I run `sudo dhclient eth0` (-: my computer has static IP therefore all my trials to install the openssh-server fails . – avis Dec 04 '15 at 20:45
  • Glad to hear you got it to work. If you have issues setting up a static IP, take a look here: http://askubuntu.com/questions/338442/how-to-set-static-ip-address – G Trawo Dec 05 '15 at 14:07
2

You have to install openssh in order to use the SSH protocol.

On the machine you want to access, install it by running :

sudo apt-get install openssh-server

Instead of disabling your firewall, allow port 22 :

sudo ufw allow 22
hg8
  • 13,410
  • 12
  • 71
  • 103