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?

  • 1
    Have you installed openssh ? – hg8 Dec 3 '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. – clearkimura Dec 3 '15 at 16:13
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.

  • 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 4 '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: askubuntu.com/questions/338442/how-to-set-static-ip-address – G Trawo Dec 5 '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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.