-
Notifications
You must be signed in to change notification settings - Fork 154
adding ability to modify allow_agent variable (which is used in paramiko client) in ParallelSSHClient & SSHClient #59
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
Conversation
…iko client) in ParallelSSHClient & SSHClient
| therefor any connection and/or authentication exceptions will happen on the | ||
| call to ``run_command`` and need to be caught. | ||
| """ | ||
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.
These indentations are there purposefully as they are used when generating docstrings.
Please revert all indentation changes in this PR.
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.
@pkittenis, i've reverted the indentations.
|
Hi there, Thanks for the interest and the PR - great investigation. Made some comments on the diff for review. The new flag functionality also needs a short unittest. Looks great other than that! Out of interest, what is the |
|
@pkittenis I've added a test case for the |
| """Wrapper class over paramiko.SSHClient with sane defaults | ||
| Honours ~/.ssh/config and /etc/ssh/ssh_config entries for host username \ | ||
| overrides""" | ||
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.
Please revert indentation changes in this file as well - thanks.
|
Looks great! Thanks again 👍 |
I ran into an issue lately where I was doing parallel executions on a lot of nodes. By default, in paramiko, ssh-agent is used during the authentication process. I kept getting the lost ssh-agent error below because ssh-agent couldn't handle the load
To reproduce the issue, try running this ensure you have ssh-agent running. Run the below command
Get PID for the ssh-agent socket from the SSH_AUTH_SOCK environment variable
Watch the file descriptors count increase!
And eventually crash with the Exception
I want to be able to use username/password OR priv key authentication and I don't want ssh-agent used for authentication. Setting the
allow_agentvariable in paramiko.SSHClient.connect function toFalseallows me to disable ssh-agent from being used during authentication.This PR is to allow us set the
allow_agentvariable in pssh's ParallelSSHClient & SSHClient and pass it down to paramiko.SSHClient.connect function where its being used