Sometimes there is the following error when you try to remotely log into a computer:
connect to host <hostname> port 22: Connection refused
where <hostname> can be buford, ferb, pathfinder, etc.
The first thing to check is whether the sshd is running.
On the host computer, log in as superuser.
Check the status of sshd.
CENTOS 8: # systemctl status sshd
CENTOS 7: # service sshd status
CENTOS 6 and earlier: # /etc/init.d/sshd status
Start sshd.
CENTOS 8: # systemctl start sshd
CENTOS 7: # service sshd start
CENTOS 6 and earlier: # /etc/init.d/sshd start
If it is running and you want to restart sshd.
CENTOS 8: # systemctl stop sshd
CENTOS 7: # service sshd stop
CENTOS 6 and earlier: # /etc/init.d/sshd stop
If it is running and you want to restart sshd.
CENTOS 8: # systemctl restart sshd
CENTOS 7: # service sshd restart
CENTOS 6 and earlier: # /etc/init.d/sshd restart
To have it start on boot, run the following command,
All CENTOS versions: # ckconfig sshd on