-
Notifications
You must be signed in to change notification settings - Fork 185
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
Windows support for ssh with password #173
Comments
Later I've found out the ParamikoMachine, but not much luck with getting it to work on Windows. the PuttyMachine was working at the end, but with breaking linux support (both in rpyc and plumbum, as can seen in their TravisCI pages ) |
Hi, I tried connecting to Windows machine from linux client. I was running freesshd in windows to get access to powershell. And from the bash, I can login to powershell (just like ssh) and run my commands. But when I tried to connect via plumbum.SshMachine (from linux to windows) I get the backtrace. >>> from plumbum import SshMachine
>>> rem = SshMachine("xx.xx.xx.xx", user="root")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/plumbum/machines/ssh_machine.py", line 106, in __init__
new_session = new_session)
File "/usr/lib/python2.6/site-packages/plumbum/machines/remote.py", line 129, in __init__
self._session = self.session(new_session = new_session)
File "/usr/lib/python2.6/site-packages/plumbum/machines/ssh_machine.py", line 150, in session
self.encoding, isatty, self.connect_timeout)
File "/usr/lib/python2.6/site-packages/plumbum/machines/session.py", line 141, in __init__
self.run("")
File "/usr/lib/python2.6/site-packages/plumbum/machines/session.py", line 224, in run
return run_proc(self.popen(cmd), retcode)
File "/usr/lib/python2.6/site-packages/plumbum/commands/processes.py", line 186, in run_proc
stdout, stderr = proc.communicate()
File "/usr/lib/python2.6/site-packages/plumbum/machines/session.py", line 92, in communicate
line = pipe.readline()
File "/usr/lib/python2.6/site-packages/plumbum/machines/session.py", line 42, in readline
raise EOFError()
EOFError Any Idea? |
This usually means that the error channel is not accessible, usually because it could not be redirected via Bash syntax on the remote machine. I've not connected to a Windows computer, but I'm assuming that it doesn't have Bash accessible to the ssh connection? The remote has to be able to support something like Have you tried ParamikoMachine? |
Thanks. The shell running in remote machine is not bash (AFAIK). So I will have to try and run different machine. When I try ParamikoMachine, it hangs and never completes. I am not sure where this hangs. Have any idea how ParamikoMachine works? Some pointer to debug it? |
I've never really looked into ParamikoMachine, I plan to at some point, but for now, I don't know much about it. Can you see where it hangs by using Control C? |
Control C does not kill the process. I have to kill the python process to get back my shell. If you take a look and find a way, please let me know. Thanks. |
How did PuttyMachine start working in the end? How did you fix the password parameter not found error? |
I was trying to do this:
and it failed on:
looking at the code, I've found PuttyMachine... that should work better...
So how can I use Plumbum SSH on windows ?
The text was updated successfully, but these errors were encountered: