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
Add auth_timeout parameter when supported by paramiko #50448
Conversation
Paramiko 2.2 introduces the auth_timeout parameter. This will set the parameter to the same value of the timeout parameter to prevent "Authentication timeout" errors.
620e5fb
to
e7f21dd
Compare
Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the auth_timeout parameter based on the installed paramiko version.
I am wondering whether there would ever be a need to set a different auth_timeout in paramiko ? |
The advantage of using the same value is that it retains current expected behavior when using a version of paramiko older than 2.2. So I don't think it is necessary to handle an extra parameter here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please create a changelog fragment. See this fragment as an example. |
This comment has been minimized.
This comment has been minimized.
9fe5863
to
7679a92
Compare
Thank you. It is done |
rebuild_merge |
Add auth_timeout parameter when supported Paramiko 2.2 introduces the auth_timeout parameter. This will set the parameter to the same value of the timeout parameter to prevent "Authentication timeout" errors. (cherry picked from commit e7f21dd) Conditionally add auth_timeout to ssh.connect Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the auth_timeout parameter based on the installed paramiko version. (cherry picked from commit 6c41e97) Add changelog fragment (cherry picked from commit 7679a92)
Add auth_timeout parameter when supported Paramiko 2.2 introduces the auth_timeout parameter. This will set the parameter to the same value of the timeout parameter to prevent "Authentication timeout" errors. (cherry picked from commit e7f21dd) Conditionally add auth_timeout to ssh.connect Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the auth_timeout parameter based on the installed paramiko version. (cherry picked from commit 6c41e97) Add changelog fragment (cherry picked from commit 7679a92)
* Add auth_timeout parameter when supported Paramiko 2.2 introduces the auth_timeout parameter. This will set the parameter to the same value of the timeout parameter to prevent "Authentication timeout" errors. * Conditionally add auth_timeout to ssh.connect Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the auth_timeout parameter based on the installed paramiko version. * Add changelog fragment
* Add auth_timeout parameter when supported Paramiko 2.2 introduces the auth_timeout parameter. This will set the parameter to the same value of the timeout parameter to prevent "Authentication timeout" errors. * Conditionally add auth_timeout to ssh.connect Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the auth_timeout parameter based on the installed paramiko version. * Add changelog fragment
Paramiko 2.2 introduces the auth_timeout parameter. This will set the
parameter to the same value of the timeout parameter to prevent
"Authentication timeout" errors.
SUMMARY
If the paramiko version installed is at least 2.2 include the auth_timeout parameter to the connect method with the same value used for the timeout method. This will prevent "Authentication timeout" errors when a slow authentication step (>30s) happens with a host. This is common with some network devices.
Fixes #42596
ISSUE TYPE
COMPONENT NAME
paramiko_ssh connection plugin
ADDITIONAL INFORMATION
I noticed that problem when using the network_cli connection plugin, which in turn uses the paramiko_ssh connection plugin.