| Summary: | ssh_exchange_identification: Connection closed by remote host | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | schneidz <henry.herold> | ||||
| Component: | sshd | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||
| Status: | CLOSED INVALID | ||||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 3.6.1p2 | ||||||
| Hardware: | ix86 | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
schneidz
2004-08-20 10:35:43 AEST
Created attachment 700 [details]
sshd_config
A debug trace from the client isn't too helpful, can you attach a trace from the server "sshd -ddd"? [root@pcp01417125pcs root]# sshd -ddd debug1: sshd version OpenSSH_3.5p1 debug1: private host key: #0 type 0 RSA1 debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key. debug1: read PEM private key done: type RSA debug1: private host key: #1 type 1 RSA debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key. debug1: read PEM private key done: type DSA debug1: private host key: #2 type 2 DSA debug1: Bind to port 22 on x.x.x.x. Server listening on x.x.x.x port 22. Generating 768 bit RSA key. RSA key generation complete. i tried multiple remote logins but could not get in. nothing in the debug trace above or in /var/log/secure The debug log shows no indication that you're even connecting to sshd. Perhaps the connection is being rejected by a firewall or NATed to another port? i have no firewall rules set up. (see iptables output) i have no hardware firewall. the server logs show no indication of a connection being made, but i'm confused as to why the debug output of the client states that a connection is established before i get the ssh_exchange_identification error. You're connecting to something but it's not the sshd you've got running in debug
mode. Try using "lsof -i :22" to see what's listening on port 22. Check your
NAT table too ("iptables -t nat -L").
It's also possible your ISP is blocking/redirecting port 22. Try "tcpdump tcp
port 22" while you're trying to connect and see if you're even getting packets.
thanks for the effort. a lot of info i never knew i could look at. appended below are the outputs to my lsof, iptables -nat, tcpdump (tcpdump is from my host to a computer i no longer have an account on. i got the same ssh_exchange_identification error where it didn't prompt me for a password): [root@pcp01417125pcs alsa]# lsof -i :22 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME sshd 4791 root 3u IPv4 4452 TCP pcp01417125pcs.umrion01.pa.comcast.net:ssh (LISTEN) [root@pcp01417125pcs alsa]# iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination tcpdump: listening on eth0 19:41:59.514613 pcp01417125pcs.umrion01.pa.comcast.net.35481 > snowhite.cis.temple.edu.ssh: S 3155502819:3155502819(0) win 5840 <mss 1460,sackOK,timestamp 1364052 0,nop,wscale 0> (DF) 19:41:59.527604 snowhite.cis.temple.edu.ssh > pcp01417125pcs.umrion01.pa.comcast.net.35481: S 1414673544:1414673544(0) ack 3155502820 win 33580 <mss 1460,nop,wscale 0> (DF) 19:41:59.527669 pcp01417125pcs.umrion01.pa.comcast.net.35481 > snowhite.cis.temple.edu.ssh: . ack 1 win 5840 (DF) 19:42:04.854215 snowhite.cis.temple.edu.ssh > pcp01417125pcs.umrion01.pa.comcast.net.35481: F 1:1(0) ack 1 win 33580 (DF) 19:42:04.854502 pcp01417125pcs.umrion01.pa.comcast.net.35481 > snowhite.cis.temple.edu.ssh: F 1:1(0) ack 2 win 5840 (DF) 19:42:04.864586 snowhite.cis.temple.edu.ssh > pcp01417125pcs.umrion01.pa.comcast.net.35481: . ack 2 win 33580 (DF) 6 packets received by filter 0 packets dropped by kernel I suggest you kill off the running sshd that's listening on port 22 then re-run the sshd -ddd test. I was able to ssh out to HBX networks luna machine, which came back online recently. i was able to ssh back into my server from luna. my workplace must have some filters/ firewalls in place which stops traffic from certain ports. thanks all for your help. |