Octav avatar

ssh not working/Connection refused on OrangePi/Debian

octav

Published: 24 Jan 2019 › Updated: 24 Jan 2019ssh not working/Connection refused on OrangePi/Debian

ssh not working/Connection refused on OrangePi/Debian

Screenshot 2019-01-24 at 20.54.53.png

Try calling sudo systemctl enable ssh (based on https://askubuntu.com/a/892449)
to enable ssh at startup.
If this does not work, proceed:

Screenshot 2019-01-24 at 20.54.21.png

The best option is to check for:
sudo service ssh status

In my case, the status of the ssh was inactive ssh active: false "start-limit-hit"

Had to check sshd -T for the problems.
Sshd did not work so had to:
sudo mkdir -p /var/run/sshd (based on https://github.com/ansible/ansible-container/issues/141)
Or, at startup, in the /etc/rc.local file:
if [ ! -d /var/run/sshd ]; then
  mkdir /var/run/sshd
  chmod 0755 /var/run/sshd
fi(based on https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/45234)


After running again the sshd -T command, "Could not load host key /etc/ssh/ssh_host_rsa_key"
ran: ssh-keygen -t rsa -b 4096
and /usr/bin/ssh-keygen -A (based on https://askubuntu.com/a/600585)


ssh Still does not start at startup, but calling sudo service ssh start seems to start ssh


Called sudo systemctl enable ssh (based on https://askubuntu.com/a/892449)
to enable ssh at startup.

  • Best of luck!

Leave ssh not working/Connection refused on OrangePi/Debian to:

Written by

- programmer

Read more #ssh posts


Best Posts From Octav

We have not curated any of octav's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Octav