0

I rebooted my Linux Mint 17.3 machine and now when I try to ssh to it, I get "Connection refused" -- what did go wrong? Here are my diagnostic steps:

$ ps -ax |grep ssh
 2013 ?     Ss  0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-$
 3346 pts/1 S+  0:00 grep --colour=auto ssh

$nmap MYSERVER
Starting Nmap 6.40 ( http://nmap.org ) at 2019-09-23 15:19 EDT
Nmap scan report for MYSERVER
Host is up (0.00028s latency).
Not shown: 998 closed ports
PORT    STATE SERVICE
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

$sudo service ssh start
start: Job is already running: ssh

$ sudo service ssh restart
ssh stop/waiting
ssh start/running

I got no output to

sudo /etc/init.d/ssh status

I read this ssh Connection refused: how to troubleshoot? but the advice there does not seem to cover my case.

1 Answer 1

1

It doesn't look like the service is running, try this to check the status of the service:

systemctl status sshd

If it is not running you can start it with:

systemctl start sshd

If you would like the service to start at boot, run:

systemctl enable sshd

Edit: I've just read your question again and realised you've tried running service ssh start, I haven't used Linux Mint 17.3, but I'd have thought it's using systemd so you'd need to use systemctl commands.

You can also run netstat -tunlp | grep ssh to see if the service is listening on port 22 as you'd expect. If it shows as listening but you're unable to connect I'd look at the firewall configuration: iptables -nvL

You must log in to answer this question.

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