ssh: connect to host random-master port 22: Connection refused
Hi Team,
This is a great article, thank you all for your contributions. I am having same issue probably different cause though .
I am running failover systems and I have master and slave servers, I have some scripts which uses rsync to sync the data between these two servers, I had to reinstall master server because the SSD died and I reinstalled the server . Ever since the installation was completed , I cannot connect to master from slave using the hostname below is the debug logs and accordingly my scripts do not work due to connection cannot be established , however I can still login using the master's eth0 IP on port 22 from slave and if I add slave's IP in fail2ban's config jail.conf on master as to be ignored then I can however my scripts still dont work ,its just that using hostname and through crossover , I get connection refused.
ssh -v random@random-master
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /root/.ssh/config
debug1: /root/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to random-master [XXX.XXX.168.151] port 22.
debug1: connect to address XXX.XXX.168.151 port 22: Connection refused
ssh: connect to host master port 22: Connection refused
netstat -anp | grep sshd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 9741/sshd
tcp6 0 0 :::22 :::* LISTEN 9741/sshd
ufw verbose
Status: inactive
iptables -L | grep ssh
fail2ban-ssh-ddos tcp -- anywhere anywhere multiport dports ssh
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
Chain fail2ban-ssh (1 references)
Chain fail2ban-ssh-ddos (1 references)
I've cleared /root/.ssh/known_hosts as well but still no luck .
Any advise and suggestions are appreciated .
Thanks in advance.
|