Skip to content

fix userauth procedure - #165

Open
curu wants to merge 1 commit into
paramiko:mainfrom
curu:master
Open

curu wants to merge 1 commit into
paramiko:mainfrom
curu:master

Conversation

@curu

@curu curu commented May 3, 2013

Copy link
Copy Markdown

For compatibility, there should be only one 'ssh-userauth' Service Request,
followed by one/many Authentication Requests, instead of sending many
Service Requests. see RFC 4251.

I encounter the problem on an old commercial Secure Shell Daemon with keyboard-interactive authentication. Transport.auth_password() by default use Transport.auth_interative as a fallback by sending another ssh-userauth service request. However, the server may regard it as an error and disconnect the client with the following message:

May  3 20:14:25 localhost sshd[21673]: WARNING: sshd-auth: The client requested authentication method `password', that is not allowed for user `root'.
May  3 20:14:25 localhost sshd[21673]: Local disconnected: Protocol error: packet 5 in interactive

The commit solved the compatibility problem for me, may it help others.

For compatibility, there should be only one 'ssh-userauth' Service Request,
followed by one/many Authentication Requests, instead of sending many
Service Requests.
@lndbrg

lndbrg commented Aug 14, 2014

Copy link
Copy Markdown
Contributor

This and #24 solve the same problem but differs a bit @curu do you have time to rebase this on the latest master and check if what he is doing with the AuthHandler is correct?

It would be swell if you could add some tests too.

@bskinn

bskinn commented Apr 28, 2023

Copy link
Copy Markdown
Contributor

Old, but flagging as potentially relevant to #387.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants