Bug 2256

Summary: ssh - Connection closed by UNKNOWN
Product: Portable OpenSSH Reporter: Petr Lautrbach <plautrba>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED INVALID    
Severity: minor    
Priority: P5    
Version: 6.6p1   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
add set_remote_ipaddr() none

Description Petr Lautrbach 2014-07-18 14:30:38 AEST
Created attachment 2456 [details]
add set_remote_ipaddr()

ssh clients shows "closed by UNKNOWN" message when a socket is closed by a
remote side while ssh is waiting for user's password:

$ ssh user@localhost
user@localhost's password:
Connection closed by UNKNOWN

When the packet_read_seqnr() calls get_remote_ipaddr(), a connection's
socket is already closed and there's not been any other call of this function
yet so canonical_host_ip from canohost.c is still NULL and the function
returns "UNKNOWN". I think that it could be workarounded by calling get_remote_ipaddr() right
after packet_set_connection(), e.g. using another debug message, see bellow, or
there could be set_remote_ipaddr() in canonhost.c for that.
Comment 1 Damien Miller 2015-08-11 23:03:22 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1