ssh:connection refused

Issues related to configuring your network
Post Reply
prsdan
Posts: 1
Joined: 2020/01/19 09:32:56

ssh:connection refused

Post by prsdan » 2020/01/19 09:37:16

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?

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ssh:connection refused

Post by TrevorH » 2020/01/20 14:04:59

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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply