-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: x/crypto/ssh: expose missing none authmethod #62657
Comments
In https://go.dev/cl/528637 the suggested API is // None return an AuthMethod using "none" authentication defined in RFC 4252 section 5.2.
func None() AuthMethod { |
Can you explain why you want to expose the None authmethod? |
@hanwen allow client side to send non-auth on their own like password or key |
@tg123 thanks for this proposal, can you please provide a real use case for this? For example a server that requires sending the none auth method after the password. The |
If there a way to control the auth to 'not' perform the none auth method, if we already know the list of auth methods the server allows? If the server disallows none auth method, and also doesn't return the auth methods it allows, the auth fails with only the none auth method attempted. |
what are you trying to do? Why do you need this? |
I am using the ssh module to connect and authenticate to an FTP server, using public key authentication method. Here's the method in my application which performs the auth :
Looking at the
|
Can OpenSSH connect to this server? If so, please post the output of |
as a library, it is better to have flexibility to create a server and client does not follow RFC auth process, |
This means that things should continue to work if the list of methods is not returned from the 'none' auth. I support this change, but it is different from the proposal that is discussed here. Open a new issue? |
Thanks for offering to help. Upon further debugging I have found out the issue is not what I thought it was. I enabled the debug logs and found that the server was returning the allowed methods on the first none auth method attempt, and the public key authentication was attempted and successful. But the server required password auth as well along with public key auth, and since no password auth method was configured in the application, the dial call failed. The error log is misleading and led me to believe the server wasn't returning the methods along with the failure message on the non auth method attempt.
I believe my hypothesis was wrong, and the server is indeed working as per the RFC. Thanks for offering to help! I am not sure if a new issue needs to be opened for the misleading error log, will do if it seems that my understanding is right. |
no api to generate none AuthMethod
expose none to public
The text was updated successfully, but these errors were encountered: