Skip to content
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

support for ssh control master #39

Open
rexissimus opened this issue Nov 2, 2012 · 7 comments
Open

support for ssh control master #39

rexissimus opened this issue Nov 2, 2012 · 7 comments
Assignees

Comments

@rexissimus
Copy link

To my knowledge, ssh connections that uses control master does not work. BatchQ tries to enter a password, although the session is already started.

@troelsfr
Copy link
Owner

troelsfr commented Nov 2, 2012

No, you are right. At the moment BatchQ is limited in the way it interacts with SSH. I am planing on extending this since it would be very useful, but my main problem is to find the time to do all the things that I plan :)

If this is a feature that you desperately need, I might have some time to look in to it next week.

@rexissimus
Copy link
Author

We are currently experimenting with BatchQ, vistrails JobSubmission package, and LSF and need to use ssh control master for authentication, so it would be great if you had time to look into this. Also, the VisTrails JobSubmission package does not work with recent versions of BatchQ, but that is another issue.

@troelsfr
Copy link
Owner

troelsfr commented Nov 4, 2012

I just tested it and you are right, it has a bug which breaks compatibility with VisTrails. However, this has been fixed now. Note that you should use the "stable" branch. The master branch is currently being heavily redesigned and is not intended for usage at the moment.

To get back to your original request I have added support for ControlMaster. It works on my local machine, but please test it and let me know whether it works for you.

@ghost ghost assigned troelsfr Nov 4, 2012
@egvalentejr
Copy link

The latest stable branch loaded fine under JobSubmission of Vistrails. However, remote subshell does not work with a control master connection as evidenced by the following output:

Uncaught exception: "Last login: ...

user@machine:~> "

Traceback (most recent call last):
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/core/modules/vistrails_module.py", line 328, in update
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/packages/JobSubmission/machine.py", line 24, in compute
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/core/batch.py", line 972, in init
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/core/batch.py", line 756, in initiate
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/core/batch.py", line 689, in call
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/core/batch.py", line 776, in initiate
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/pipelines/shell/utils.py", line 99, in init
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/pipelines/shell/ssh.py", line 152, in init
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/pipelines/shell/ssh.py", line 43, in init
File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/batchq/pipelines/shell/ssh.py", line 69, in connect
BaseSecureTerminalLoginError: Last login: ...

user@machine:~>

I think this has to do with the regular expression matching just above line 69 of ssh.py. It would be more generic if we had a way to input what that expression is expected to be under the control master mode. But then again there maybe more at play as well. Thanks.

@troelsfr
Copy link
Owner

troelsfr commented Nov 5, 2012

Yes, you are right. It is because the standard prompts it looks for are "$" and "sftp>", since it has clearly logged in "Last login: Mon Nov 5 11:12:36 2012 from login3.nccs.nasa.gov".

Unfortunately, I do not think that I will have the time to implement this for you tonight. However, in the meanwhile, you can modify the standard regex pattern in the constructor of the init in batchq.pipelines.shell.ssh and add ">". This should do the trick. I am still awake for a few more hours, so I will still be responsive in case this does not solve your problem.

@troelsfr
Copy link
Owner

troelsfr commented Nov 5, 2012

Hi again. If you checkout the latest version everything should work. The remote shell now has a login_expect where you can add ">".

@egvalentejr
Copy link

Thanks. Looks promising so far.

On Nov 5, 2012, at 14:58, troelsfr [email protected] wrote:

Hi again. If you checkout the latest version everything should work. The remote shell now has a login_expect where you can add ">".


Reply to this email directly or view it on GitHub.

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

No branches or pull requests

3 participants