ssh fails to auth; immediate disconnect

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
User avatar
TrevorH
Forum Moderator
Posts: 26927
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ssh fails to auth; immediate disconnect

Post by TrevorH » 2013/01/02 19:26:52

Nothing unusual there that I can see. Can you post the output of `iptables-save`

Edit: Might be worth running `rpm -Va openssh\*` too. If all is correct it should return no output otherwise it will list any files that differ from the RPM version.

Phylum
Posts: 10
Joined: 2012/12/16 16:59:13

Re: ssh fails to auth; immediate disconnect

Post by Phylum » 2013/01/02 21:26:10

Thanks for the responses - here's the info:

iptables-save
[code]
# Generated by iptables-save v1.3.5 on Wed Jan 2 16:23:12 2013
*mangle
:PREROUTING ACCEPT [13036683:13716519049]
:INPUT ACCEPT [13036683:13716519049]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [6529586:6970706256]
:POSTROUTING ACCEPT [6529426:6970641935]
COMMIT
# Completed on Wed Jan 2 16:23:12 2013
# Generated by iptables-save v1.3.5 on Wed Jan 2 16:23:12 2013
*nat
:PREROUTING ACCEPT [143609:9485313]
:POSTROUTING ACCEPT [35617:2199014]
:OUTPUT ACCEPT [35661:2248731]
COMMIT
# Completed on Wed Jan 2 16:23:12 2013
# Generated by iptables-save v1.3.5 on Wed Jan 2 16:23:12 2013
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
:INVALID - [0:0]
:INVDROP - [0:0]
:LOCALINPUT - [0:0]
:LOCALOUTPUT - [0:0]
:LOGDROPIN - [0:0]
:LOGDROPOUT - [0:0]
:acctboth - [0:0]
-A INPUT -j acctboth
-A INPUT -s 8.8.4.4 -i ! lo -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -s 8.8.4.4 -i ! lo -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -s 8.8.4.4 -i ! lo -p tcp -m tcp --sport 53 -j ACCEPT
-A INPUT -s 8.8.4.4 -i ! lo -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -s 8.8.8.8 -i ! lo -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -s 8.8.8.8 -i ! lo -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -s 8.8.8.8 -i ! lo -p tcp -m tcp --sport 53 -j ACCEPT
-A INPUT -s 8.8.8.8 -i ! lo -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -i ! lo -j LOCALINPUT
-A INPUT -i lo -j ACCEPT
-A INPUT -i ! lo -p tcp -j INVALID
-A INPUT -i ! lo -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 143 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 465 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 995 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2077 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2078 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2082 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2083 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2086 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2087 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2095 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 2096 -j ACCEPT
-A INPUT -i ! lo -p udp -m state --state NEW -m udp --dport 20 -j ACCEPT
-A INPUT -i ! lo -p udp -m state --state NEW -m udp --dport 21 -j ACCEPT
-A INPUT -i ! lo -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A INPUT -i ! lo -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j ACCEPT
-A INPUT -i ! lo -p icmp -m icmp --icmp-type 0 -m limit --limit 1/sec -j ACCEPT
-A INPUT -i ! lo -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -i ! lo -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -i ! lo -j LOGDROPIN
-A OUTPUT -j acctboth
-A OUTPUT -d 8.8.4.4 -o ! lo -p tcp -m tcp --dport 53 -j ACCEPT
-A OUTPUT -d 8.8.4.4 -o ! lo -p udp -m udp --dport 53 -j ACCEPT
-A OUTPUT -d 8.8.4.4 -o ! lo -p tcp -m tcp --sport 53 -j ACCEPT
-A OUTPUT -d 8.8.4.4 -o ! lo -p udp -m udp --sport 53 -j ACCEPT
-A OUTPUT -d 8.8.8.8 -o ! lo -p tcp -m tcp --dport 53 -j ACCEPT
-A OUTPUT -d 8.8.8.8 -o ! lo -p udp -m udp --dport 53 -j ACCEPT
-A OUTPUT -d 8.8.8.8 -o ! lo -p tcp -m tcp --sport 53 -j ACCEPT
-A OUTPUT -d 8.8.8.8 -o ! lo -p udp -m udp --sport 53 -j ACCEPT
-A OUTPUT -o ! lo -j LOCALOUTPUT
-A OUTPUT -o ! lo -p tcp -m tcp --dport 53 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m udp --dport 53 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m tcp --sport 53 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m udp --sport 53 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o ! lo -p tcp -j INVALID
-A OUTPUT -o ! lo -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 37 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 43 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 113 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 2087 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 2089 -j ACCEPT
-A OUTPUT -o ! lo -p tcp -m state --state NEW -m tcp --dport 2703 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 20 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 21 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 113 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 123 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 873 -j ACCEPT
-A OUTPUT -o ! lo -p udp -m state --state NEW -m udp --dport 6277 -j ACCEPT
-A OUTPUT -o ! lo -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A OUTPUT -o ! lo -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A OUTPUT -o ! lo -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A OUTPUT -o ! lo -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A OUTPUT -o ! lo -j LOGDROPOUT
-A INVALID -m state --state INVALID -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags FIN,RST FIN,RST -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags FIN,ACK FIN -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags PSH,ACK PSH -j INVDROP
-A INVALID -p tcp -m tcp --tcp-flags ACK,URG URG -j INVDROP
-A INVALID -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j INVDROP
-A INVDROP -j DROP
-A LOCALINPUT -s 10.0.0.120 -i ! lo -j ACCEPT
-A LOCALINPUT -s 10.0.0.74 -i ! lo -j ACCEPT
-A LOCALINPUT -s 173.79.162.182 -i ! lo -j ACCEPT
-A LOCALINPUT -s 173.79.175.50 -i ! lo -j ACCEPT
-A LOCALINPUT -s 58.221.42.178 -i ! lo -j DROP
-A LOCALINPUT -s 203.45.134.40 -i ! lo -j DROP
-A LOCALINPUT -s 90.184.114.13 -i ! lo -j DROP
-A LOCALINPUT -s 23.25.216.129 -i ! lo -j DROP
-A LOCALINPUT -s 50.34.240.12 -i ! lo -j DROP
-A LOCALINPUT -s 184.91.103.84 -i ! lo -j DROP
-A LOCALINPUT -s 74.164.14.171 -i ! lo -j DROP
-A LOCALINPUT -s 87.216.171.74 -i ! lo -j DROP
-A LOCALINPUT -s 89.119.220.57 -i ! lo -j DROP
-A LOCALINPUT -s 173.200.3.25 -i ! lo -j DROP
-A LOCALINPUT -s 24.96.212.163 -i ! lo -j DROP
-A LOCALINPUT -s 70.90.65.253 -i ! lo -j DROP
-A LOCALINPUT -s 50.73.168.197 -i ! lo -j DROP
-A LOCALINPUT -s 75.149.2.246 -i ! lo -j DROP
-A LOCALINPUT -s 208.53.75.36 -i ! lo -j DROP
-A LOCALINPUT -s 71.186.195.38 -i ! lo -j DROP
-A LOCALINPUT -s 79.189.206.122 -i ! lo -j DROP
-A LOCALINPUT -s 50.121.152.110 -i ! lo -j DROP
-A LOCALINPUT -s 24.39.118.70 -i ! lo -j DROP
-A LOCALINPUT -s 74.11.126.243 -i ! lo -j DROP
-A LOCALINPUT -s 108.64.133.67 -i ! lo -j DROP
-A LOCALINPUT -s 37.209.31.239 -i ! lo -j DROP
-A LOCALINPUT -s 165.228.246.237 -i ! lo -j DROP
-A LOCALINPUT -s 71.177.221.87 -i ! lo -j DROP
-A LOCALINPUT -s 70.91.112.89 -i ! lo -j DROP
-A LOCALINPUT -s 50.194.23.90 -i ! lo -j DROP
-A LOCALINPUT -s 24.234.155.80 -i ! lo -j DROP
-A LOCALOUTPUT -d 10.0.0.120 -o ! lo -j ACCEPT
-A LOCALOUTPUT -d 10.0.0.74 -o ! lo -j ACCEPT
-A LOCALOUTPUT -d 173.79.162.182 -o ! lo -j ACCEPT
-A LOCALOUTPUT -d 173.79.175.50 -o ! lo -j ACCEPT
-A LOCALOUTPUT -d 58.221.42.178 -o ! lo -j DROP
-A LOCALOUTPUT -d 203.45.134.40 -o ! lo -j DROP
-A LOCALOUTPUT -d 90.184.114.13 -o ! lo -j DROP
-A LOCALOUTPUT -d 23.25.216.129 -o ! lo -j DROP
-A LOCALOUTPUT -d 50.34.240.12 -o ! lo -j DROP
-A LOCALOUTPUT -d 184.91.103.84 -o ! lo -j DROP
-A LOCALOUTPUT -d 74.164.14.171 -o ! lo -j DROP
-A LOCALOUTPUT -d 87.216.171.74 -o ! lo -j DROP
-A LOCALOUTPUT -d 89.119.220.57 -o ! lo -j DROP
-A LOCALOUTPUT -d 173.200.3.25 -o ! lo -j DROP
-A LOCALOUTPUT -d 24.96.212.163 -o ! lo -j DROP
-A LOCALOUTPUT -d 70.90.65.253 -o ! lo -j DROP
-A LOCALOUTPUT -d 50.73.168.197 -o ! lo -j DROP
-A LOCALOUTPUT -d 75.149.2.246 -o ! lo -j DROP
-A LOCALOUTPUT -d 208.53.75.36 -o ! lo -j DROP
-A LOCALOUTPUT -d 71.186.195.38 -o ! lo -j DROP
-A LOCALOUTPUT -d 79.189.206.122 -o ! lo -j DROP
-A LOCALOUTPUT -d 50.121.152.110 -o ! lo -j DROP
-A LOCALOUTPUT -d 24.39.118.70 -o ! lo -j DROP
-A LOCALOUTPUT -d 74.11.126.243 -o ! lo -j DROP
-A LOCALOUTPUT -d 108.64.133.67 -o ! lo -j DROP
-A LOCALOUTPUT -d 37.209.31.239 -o ! lo -j DROP
-A LOCALOUTPUT -d 165.228.246.237 -o ! lo -j DROP
-A LOCALOUTPUT -d 71.177.221.87 -o ! lo -j DROP
-A LOCALOUTPUT -d 70.91.112.89 -o ! lo -j DROP
-A LOCALOUTPUT -d 50.194.23.90 -o ! lo -j DROP
-A LOCALOUTPUT -d 24.234.155.80 -o ! lo -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 67 -j DROP
-A LOGDROPIN -p udp -m udp --dport 67 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 68 -j DROP
-A LOGDROPIN -p udp -m udp --dport 68 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 111 -j DROP
-A LOGDROPIN -p udp -m udp --dport 111 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 113 -j DROP
-A LOGDROPIN -p udp -m udp --dport 113 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 135:139 -j DROP
-A LOGDROPIN -p udp -m udp --dport 135:139 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 445 -j DROP
-A LOGDROPIN -p udp -m udp --dport 445 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 500 -j DROP
-A LOGDROPIN -p udp -m udp --dport 500 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 513 -j DROP
-A LOGDROPIN -p udp -m udp --dport 513 -j DROP
-A LOGDROPIN -p tcp -m tcp --dport 520 -j DROP
-A LOGDROPIN -p udp -m udp --dport 520 -j DROP
-A LOGDROPIN -p tcp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *TCP_IN Blocked* "
-A LOGDROPIN -p udp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *UDP_IN Blocked* "
-A LOGDROPIN -p icmp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *ICMP_IN Blocked* "
-A LOGDROPIN -j DROP
-A LOGDROPOUT -p tcp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *TCP_OUT Blocked* "
-A LOGDROPOUT -p udp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *UDP_OUT Blocked* "
-A LOGDROPOUT -p icmp -m limit --limit 30/min -j LOG --log-prefix "Firewall: *ICMP_OUT Blocked* "
-A LOGDROPOUT -j DROP
-A acctboth -s 10.0.0.22 -i ! lo -p tcp -m tcp --dport 80
-A acctboth -d 10.0.0.22 -i ! lo -p tcp -m tcp --sport 80
-A acctboth -s 10.0.0.22 -i ! lo -p tcp -m tcp --dport 25
-A acctboth -d 10.0.0.22 -i ! lo -p tcp -m tcp --sport 25
-A acctboth -s 10.0.0.22 -i ! lo -p tcp -m tcp --dport 110
-A acctboth -d 10.0.0.22 -i ! lo -p tcp -m tcp --sport 110
-A acctboth -s 10.0.0.22 -i ! lo -p icmp
-A acctboth -d 10.0.0.22 -i ! lo -p icmp
-A acctboth -s 10.0.0.22 -i ! lo -p tcp
-A acctboth -d 10.0.0.22 -i ! lo -p tcp
-A acctboth -s 10.0.0.22 -i ! lo -p udp
-A acctboth -d 10.0.0.22 -i ! lo -p udp
-A acctboth -s 10.0.0.22 -i ! lo
-A acctboth -d 10.0.0.22 -i ! lo
-A acctboth -s 10.0.0.243 -i ! lo -p tcp -m tcp --dport 80
-A acctboth -d 10.0.0.243 -i ! lo -p tcp -m tcp --sport 80
-A acctboth -s 10.0.0.243 -i ! lo -p tcp -m tcp --dport 25
-A acctboth -d 10.0.0.243 -i ! lo -p tcp -m tcp --sport 25
-A acctboth -s 10.0.0.243 -i ! lo -p tcp -m tcp --dport 110
-A acctboth -d 10.0.0.243 -i ! lo -p tcp -m tcp --sport 110
-A acctboth -s 10.0.0.243 -i ! lo -p icmp
-A acctboth -d 10.0.0.243 -i ! lo -p icmp
-A acctboth -s 10.0.0.243 -i ! lo -p tcp
-A acctboth -d 10.0.0.243 -i ! lo -p tcp
-A acctboth -s 10.0.0.243 -i ! lo -p udp
-A acctboth -d 10.0.0.243 -i ! lo -p udp
-A acctboth -s 10.0.0.243 -i ! lo
-A acctboth -d 10.0.0.243 -i ! lo
-A acctboth -s 10.0.0.209 -i ! lo -p tcp -m tcp --dport 80
-A acctboth -d 10.0.0.209 -i ! lo -p tcp -m tcp --sport 80
-A acctboth -s 10.0.0.209 -i ! lo -p tcp -m tcp --dport 25
-A acctboth -d 10.0.0.209 -i ! lo -p tcp -m tcp --sport 25
-A acctboth -s 10.0.0.209 -i ! lo -p tcp -m tcp --dport 110
-A acctboth -d 10.0.0.209 -i ! lo -p tcp -m tcp --sport 110
-A acctboth -s 10.0.0.209 -i ! lo -p icmp
-A acctboth -d 10.0.0.209 -i ! lo -p icmp
-A acctboth -s 10.0.0.209 -i ! lo -p tcp
-A acctboth -d 10.0.0.209 -i ! lo -p tcp
-A acctboth -s 10.0.0.209 -i ! lo -p udp
-A acctboth -d 10.0.0.209 -i ! lo -p udp
-A acctboth -s 10.0.0.209 -i ! lo
-A acctboth -d 10.0.0.209 -i ! lo
-A acctboth -s 10.0.0.249 -i ! lo -p tcp -m tcp --dport 80
-A acctboth -d 10.0.0.249 -i ! lo -p tcp -m tcp --sport 80
-A acctboth -s 10.0.0.249 -i ! lo -p tcp -m tcp --dport 25
-A acctboth -d 10.0.0.249 -i ! lo -p tcp -m tcp --sport 25
-A acctboth -s 10.0.0.249 -i ! lo -p tcp -m tcp --dport 110
-A acctboth -d 10.0.0.249 -i ! lo -p tcp -m tcp --sport 110
-A acctboth -s 10.0.0.249 -i ! lo -p icmp
-A acctboth -d 10.0.0.249 -i ! lo -p icmp
-A acctboth -s 10.0.0.249 -i ! lo -p tcp
-A acctboth -d 10.0.0.249 -i ! lo -p tcp
-A acctboth -s 10.0.0.249 -i ! lo -p udp
-A acctboth -d 10.0.0.249 -i ! lo -p udp
-A acctboth -s 10.0.0.249 -i ! lo
-A acctboth -d 10.0.0.249 -i ! lo
-A acctboth -i ! lo
COMMIT
# Completed on Wed Jan 2 16:23:12 2013[/code]

# rpm -Va openssh\*
[code]..5....T c /etc/ssh/sshd_config
.M...... /usr/libexec/openssh/ssh-keysign[/code]

olzorenko
Posts: 1
Joined: 2015/01/07 22:39:11

Re: ssh fails to auth; immediate disconnect

Post by olzorenko » 2015/01/07 22:47:31

Hello all!

Sorry for posting in 2-year old topic, but today I can`t find any information about this problem.

I had the same error and the same symptoms. In my case the issue was in not enough space on / partition.

When I was cleaned / and reboot the machine - I successfully logged in and segfault goes away.

Best Regards.

Locked

Return to “CentOS 5 - Server Support”