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?

2
  • 1
    Have you installed openssh ?
    – hg8
    Dec 3, 2015 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.
    – user37165
    Dec 3, 2015 at 16:13

2 Answers 2

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.

2
  • 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, 2015 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, 2015 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
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .