LibSSH2 password expire issue

Dan Fandrich dan at
Fri Sep 8 18:49:12 CEST 2023

On Thu, Sep 07, 2023 at 01:18:51PM +0600, Amirul Islam via libssh2-devel wrote:
> I am having a little problem, I checked around online, but could not find a reasonable explanation. I am trying to authenticate a session with a linux box. The user password is expired, but the functions "libssh2_userauth_password_ex" or "libssh2_userauth_publickey_fromfile_ex" never fails with LIBSSH2_ERROR_PASSWORD_EXPIRED, following is my code.

There is a specific SSH protocol message code (60) that the server needs to
send for this to happen. Based on the logs, it seems the server does not send
it. Instead, it sends SSH_MSG_USERAUTH_SUCCESS (i.e. it allows the login) then
asks the user to change it interactively instead.


More information about the libssh2-devel mailing list