RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1668011 - ssh aborts connection without providing reason on authentication timeout
Summary: ssh aborts connection without providing reason on authentication timeout
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssh
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Jakub Jelen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-21 17:09 UTC by Hubert Kario
Modified: 2019-01-23 19:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 19:33:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 912792 0 low CLOSED ssh client showing Connection closed by UNKNOWN after timeout at password prompt 2021-02-22 00:41:40 UTC

Description Hubert Kario 2019-01-21 17:09:59 UTC
Description of problem:
when the server has short LoginGraceTime the client will just print that the connection was closed, without stating the reason (to indicate that it wasn't just TCP connection dropped)

Version-Release number of selected component (if applicable):
openssh-7.8p1-3.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. set LoginGraceTime to 10 seconds in sshd_config
2. connect to server, don't enter password on prompt, wait 10 seconds

Actual results:
Connection closed by 127.0.0.1 port 22

Expected results:
Authentication failed

Additional info:
The expected behaviour is present in RHEL-7 openssh.

The message itself is not much of a problem - it's the underlying cause that is important - e.g. is it because the server doesn't send SSH_MSG_DISCONNECT now?

Comment 1 Jakub Jelen 2019-01-23 19:33:38 UTC
Checking and comparing the results from RHEL7 and RHEL8, they behave completely same on the server side. The last messages generated by the preauth child are the following (failed publickey authentication):

  sshd[12970]: debug3: userauth_finish: failure partial=0 next methods="publickey,gssapi-keyex,gssapi-with-mic,password" [preauth]
  sshd[12970]: debug3: send packet: type 51 [preauth]

The server side handling of the login grace time is also the same in the RHEL7 and RHEL8, once the timeout expires, it kills the preauth child, any other processes that it started and then it kills itself. No messages on the network is sent (would be logged with "send packet" debug3 messages).

This means that the only difference is now how the "closed connection" is handled inside of the client application and what message is provided to the user. The first one you see comes directly as fatal from the sshconnec2.c as fatal(), while the other is from packet layer sshpkt_fatal(), since the disconnect was probably noticed some different place earlier while sending the packet.

If the client would receive in either of the cases a message SSH_MSG_DISCONNECT, the client log would say "Received disconnect from ...".

As discussed before, I do not see this as a problem (especially if this worked the same way in RHEL7.3 and before).


Note You need to log in before you can comment on or make changes to this bug.