LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-11-2020, 09:48 AM   #16
ttushar
LQ Newbie
 
Registered: Feb 2020
Posts: 1

Rep: Reputation: Disabled
Angry 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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Connection Refused? lowpro2k3 Linux - Networking 2 11-04-2009 11:02 AM
ssh in fedora: connection refused zwanzig Linux - Networking 8 06-11-2004 04:26 AM
ssh secure connection refused lugoteehalt Linux - Networking 2 03-19-2004 10:33 AM
ssh connection refused rguptatx Red Hat 4 11-13-2003 06:18 PM
SSH port...Connection....refused?? Miyamoto Mandriva 6 08-26-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration