Skip to content

no support for Proxying #6

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

Closed
netllama opened this issue Aug 29, 2014 · 5 comments · Fixed by #10
Closed

no support for Proxying #6

netllama opened this issue Aug 29, 2014 · 5 comments · Fixed by #10
Assignees

Comments

@netllama
Copy link

I'd like to use parallel-ssh for several projects, however all of my servers can only be accessed by proxying through a bastion host. I can easily deal with this from the ssh command line by setting the ProxyCommand directive in my ~/.ssh/config for each Host stanza. However, I can't find any way to make use of the ProxyCommand with parallel-ssh.

paramiko definitely appears to support proxying (for example: https://gist.github.com/tell-k/4943359 ). However proxying requires a call to paramiko.SSHClient.connect(sock=) which is hostname specific. It would seem like the correct place to add the sock parameter is in ParallelSSHClient()?
Am I missing an obvious way to make this work with parallel-ssh?

@netllama
Copy link
Author

I also need a mechanism for ssh agent support. That too works with paramiko, however it also requires a call to paramiko.SSHClient.connect() which is hostname specific.

@pkittenis pkittenis self-assigned this Sep 2, 2014
@pkittenis
Copy link
Member

Thanks, have marked this as a new feature. Keys in ssh-agent are used already, that is the paramiko default.

If you mean ssh-agent forwarding, then yes that is currently not in ParallelSSH. Have raised #8 for that.

@netllama
Copy link
Author

netllama commented Sep 2, 2014

thanks

@pkittenis
Copy link
Member

To answer your question btw, the correct place to do this is in pssh.SSHClient.

There is essentialy a pssh.SSHClient instance per a single, unique, hostname in the host list passed to pssh.ParallelSSHClient.

Anything that is host specific or acts on a single SSH client/server belongs in pssh.SSHClient, which is then automatically used when acting in parallel via ParallelSSHClient.

Flow diagram looks like:

pssh.ParallelSSHClient <-> pssh.SSHClient <-> SSH server

@pkittenis
Copy link
Member

ProxyCommand support is now merged, so is agent forwarding from #8.

There is debug logging for the proxy command configured, you will see something like the below with debug logging enabled:

Proxy configured for destination host <host> - ProxyCommand: '<command>'

There is an equivalent ProxyCommandException now raised, see https://github.com/pkittenis/parallel-ssh/blob/master/pssh.py#L63

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

Successfully merging a pull request may close this issue.

2 participants