{"action":"created","issue":{"url":"https://api.github.com/repos/mwilliamson/spur.py/issues/41","repository_url":"https://api.github.com/repos/mwilliamson/spur.py","labels_url":"https://api.github.com/repos/mwilliamson/spur.py/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/mwilliamson/spur.py/issues/41/comments","events_url":"https://api.github.com/repos/mwilliamson/spur.py/issues/41/events","html_url":"https://github.com/mwilliamson/spur.py/issues/41","id":157765167,"number":41,"title":"Add proxy command capabilities to SshShell","user":{"login":"lindycoder","id":12926519,"avatar_url":"https://avatars.githubusercontent.com/u/12926519?v=3","gravatar_id":"","url":"https://api.github.com/users/lindycoder","html_url":"https://github.com/lindycoder","followers_url":"https://api.github.com/users/lindycoder/followers","following_url":"https://api.github.com/users/lindycoder/following{/other_user}","gists_url":"https://api.github.com/users/lindycoder/gists{/gist_id}","starred_url":"https://api.github.com/users/lindycoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindycoder/subscriptions","organizations_url":"https://api.github.com/users/lindycoder/orgs","repos_url":"https://api.github.com/users/lindycoder/repos","events_url":"https://api.github.com/users/lindycoder/events{/privacy}","received_events_url":"https://api.github.com/users/lindycoder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-31T20:39:58Z","updated_at":"2016-05-31T21:30:51Z","closed_at":null,"body":"Hello,\r\n\r\nThis is sort a feature request / proposition.\r\n\r\nWhen using paramiko's client.connect, you can can specify a sock=,  this parameter can be passed an instance of paramiko.proxy.ProxyCommand instanciated with a proxy command such as...\r\n\"ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null user@proxyname nc -q0 1.2.3.4 22\"\r\nWhich would connect to 1.2.3.4 through the given proxy\r\n\r\nSo i would like to propose this change but wanted to know how you would see it implemented:\r\n\r\n* Ultra simple but very unituitive: spur.SshShell() takes a sock= param, keep it in self and pass it co client.connect in _connect_ssh \r\n  * you would have to craft your proxy command yourself\r\n  * could be useful for other use cases\r\n\r\n* Simple and more user-friendly : spur.SshShell() takes a proxy_command= param, keep it in self and makes a ProxyCommand to pass to client.connect in _connect_ssh \r\n  * User needs understanding of proxy command (an example would be supplied) but won't have to directly refer to paramiko\r\n\r\n* More complex but most user-friendly i think:  spur.SshShell() takes a proxy **object** that would define a user / pass / key for the proxy along with the port and some options, one would say you could even supply a SshShell as a proxy (value wise... maybe not implementation wise)\r\n  * Could look like SshShell(username... proxy=SshShell(username...))\r\n  * Or something along the lines of proxy=Proxy(username...) which would be a new object related only to proxying values.\r\n\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/mwilliamson/spur.py/issues/comments/222827366","html_url":"https://github.com/mwilliamson/spur.py/issues/41#issuecomment-222827366","issue_url":"https://api.github.com/repos/mwilliamson/spur.py/issues/41","id":222827366,"user":{"login":"lindycoder","id":12926519,"avatar_url":"https://avatars.githubusercontent.com/u/12926519?v=3","gravatar_id":"","url":"https://api.github.com/users/lindycoder","html_url":"https://github.com/lindycoder","followers_url":"https://api.github.com/users/lindycoder/followers","following_url":"https://api.github.com/users/lindycoder/following{/other_user}","gists_url":"https://api.github.com/users/lindycoder/gists{/gist_id}","starred_url":"https://api.github.com/users/lindycoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindycoder/subscriptions","organizations_url":"https://api.github.com/users/lindycoder/orgs","repos_url":"https://api.github.com/users/lindycoder/repos","events_url":"https://api.github.com/users/lindycoder/events{/privacy}","received_events_url":"https://api.github.com/users/lindycoder/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T21:30:51Z","updated_at":"2016-05-31T21:30:51Z","body":"Sure sounds nice... i'll change my PR to have a new sock= parameter to which you can feed anything, that would unblock me\r\n\r\nand in a second pass the ssh_command helper could be added "}}
{"actor":{"display_login":"lindycoder"}}