ssh port 22 connection refused
I am getting an error
ssh: connect to host 10.5.6.206 port 22: Connection refused
when I am trying to login from a remote machine using LAN.It used to work fine earlier but changed since the selinux configuration was changed from enforcing to permissive.
output of ssh -v :
OpenSSH_5.6p1, OpenSSL 1.0.0j-fips 10
May 2012 debug1: Reading configuration
data /etc/ssh/ssh_config debug1:
Applying options for * debug2:
ssh_connect: needpriv 0 debug1:
Connecting to xx.x.x.xxx [xx.x.x.xxx]
port 22. debug1: connect to address
xx.x.x.xxx port 22: Connection refused ssh: connect to host xx.x.x.xxx port
22: Connection refused
@Nagaraju What if you switch back SELINUX to enforcing? Can you do that on target machine ed ssh -v one more time?
Even then I get the same error
@Nagaraju I guess it is not a SELINUX issue then. Are you able to login to the target server in some way?
No as your answer suggests sshd daemon is not running.How should I fix it.when I do /etc/init.d/sshd start it says "Job failed. See system logs and 'systemctl status' for details."
On the server (10.5.6.206) - does
systemctl status sshd.service
say anything interesting? Anything in /var/log/messages telling why sshd does not start? Do:/usr/sbin/sshd
- this will print (if) any configuration errors in /etc/ssh/sshd_config