Skip to content

auth_type hard coded in ssh2 module #172

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

Open
maximumG opened this issue Aug 6, 2018 · 3 comments
Open

auth_type hard coded in ssh2 module #172

maximumG opened this issue Aug 6, 2018 · 3 comments

Comments

@maximumG
Copy link
Contributor

maximumG commented Aug 6, 2018

for type_name in auth_types[method]:

The supported auth_type are hardcoded in the ssh2 module. I propose to have the possibility to set the auth_type inside the SSH2 constructor which will override the hardcoded one.

The use case is to speed up authentication phase when we know which authentication type to use (most of the time password authentication), so that we don't spend extra time testing interactive, auth_agent, auto_key.

@lathspell
Copy link

Have you measured a noticable effect? When I run ssh -v $host | ts '%.S' I can only see 0.15s or so between SSH2_MSG_SERVICE_ACCEPT and "Next authentication method: password".

@maximumG
Copy link
Contributor Author

maximumG commented Aug 6, 2018

Basically we are using some devices (Huawei) which are drastically long to send the public key so each re-connection/disconnection (before my last pull request) would lead in 10s before getting the actual prompt after password authentication.

On the other hand, when using Exscript in a multiprocessing environment for up to 7000 hosts, I think that this 0.15s matters.

I will create a patch and send a pull request if someone from the project agree with this.

@knipknap
Copy link
Owner

knipknap commented Aug 6, 2018

The use case makes sense to me... though I assume you mean that auth_method should be configurable, not auth_types. (auth_types is just a map.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants