Page 1 of 1

ssh:connection refused

Posted: 2020/01/19 09:37:16
by prsdan
I wanna ssh localhost
but after I use this command it will return this error message
ssh: connect to host localhost port 22: Connection refused

I tried to open this port
but apparently 22 is not in ports that are listening I don't know what to do?

Re: ssh:connection refused

Posted: 2020/01/20 14:04:59
by TrevorH
If port 22 does not show up in the output from netstat -antup | grep :22 then your ssh daemon is either not running or is not listening on port 22 (on localhost). Or you've deleted the line from the default iptables config that allows all connections on -i lo.