10

I have installed Ubuntu Mate 16.04.2 LTS on my Pi2 and installed OpenSSH but when the Pi starts/restarts SSH does not automatically turn on.

I've tried sudo systemct1 enable ssh but all I get is "Command not found"

I am connecting via wifi from my windows PC, if I enable the service manually I am able to connect without issue, I just can't get it to enable SSH on boot.

I am a newer user so if this is a multi-step process I would appreciate a step by step answer, thank you.

Finger78
  • 109

5 Answers5

16

I think the command you're looking for is:

sudo systemctl enable ssh

(Note the letter "l" at the end of systemctl, rather than the number "1" at the end of systemct1 as you currently have it in the question.)

sempaiscuba
  • 1,453
9

I experienced a problem when commands from this topic wouldn't help. I am on Mate 18.04 and I got ssh to work only after I reinstalled openssh-server and run command from topic. So if you experience the same problem, just:

sudo apt-get remove openssh-server
sudo apt-get install openssh-server
# I rebooted system after install
sudo systemctl enable ssh
8

To enable SSH server, you can try opening up a terminal window and typing the following command:

sudo service ssh enable

and then SSH server should be enabled on restart.

Ken
  • 612
3

Try running these 2 commands which should enable ssh:

sudo systemctl enable ssh
sudo service ssh restart
stumblebee
  • 4,379
vinod
  • 31
1

This worked for me

sudo dpkg-reconfigure openssh-server