Getting available authentication methods, and listing allowed methods
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.9k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
I may be wrong about this, but it seems that SSHClient._auth() always tries the same static set of authentication methods. This prevents the client from opting to use no authentication by passing 'none' as its only preferred authentication method. This is explicitly listed by the relevant RFC as being offered primarily to allow the client to see which authentication methods are available from the server.
For what it's worth, I was toying around with the paramiko auth options for a while, and found this SSH protocol feature on StackOverflow.
Beyond allowing the client more control over authentication, the 'none' option is useful for things like automated security scanning. It would be simple to write a function specifically for this purpose - something like SSHClient.supported_auth_methods(). If SSHClient._auth() were changed to allow user-specified authentication preferences, this function would just be a wrapper of SSHClient._auth() called with preferred_auth=['none'], or something like that.
Thanks for reading this, and thanks for writing this great package!
plsql
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SSHClient._auth() and the authentication-method behavior described in RFC 4252. Check how preferred methods are currently selected, then define how a supported_auth_methods-style entry point should report methods when 'none' is requested. Done means the client can request only the specified preference and expose the server's available authentication methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100