Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Synchronized project over multi-hop SSH, no SSH tunnel

Hi,

there a couple of different ways how one can do ssh proxy forwarding. And in my experience at least one of them should work. If we know which one works for your machine we can suggest how to do that in PTP. Usually they are chainable so you can try to get a working tunnel for each step and then combine them.

1) Port forwarding
a) single:
ssh -L2022:{host}:22 {gw} -N & sleep 1; ssh localhost -p 2022
Works if port forwarding isn't disabled.
b) dynamic:
ssh -D9000 {gw} -N & sleep 1; ssh -o ProxyCommand="netcat -x localhost:9000 %h %p" {host}
Probably doesn't work either if a doesn't work. netcat can also be called nc. Only required locally so can be installed if not available.
c) tun:
Even less likely to work. Just mentioned for completeness.
2) ProxyCommand
a) ssh -W
ssh -o ProxyCommand='ssh {gw} -W %h:%p' {host} 
Works for ssh2 if not explicitly disabled
b) netcat/nc
ssh -o ProxyCommand="ssh {gw} 'netcat %h %p'" {host}
Works if netcat (sometimes also called nc) is installed. If you have full shell access you can install netcat remotely
c) bash redirect
ssh -o ProxyCommand="nohup ssh {gw} 'exec 3<>/dev/tcp/%h/%p;cat <&3 & cat >&3; kill $!' 2>/dev/null" {host}
Works with typical bash shell. If your default shell isn't bash you need to add a "/bin/bash -c".

{gw}: replace with gateway name. {host}: replace with (final) host you want to connect to

This doesn't list the myriad of other ways to do forwarding over non-SSH gateways (e.g. Socks or Http proxies).

At least 2c) should usually work. Of course you shouldn't do anything which is against the user-policy of the machine.

PTP currently only has support for 1a. I had the intention to allow other options: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345329. But I never finished it.
If you let me know which options work I probably can tell you how to make it work with PTP.

Roland

On Wed, Sep 24, 2014 at 9:29 AM, Rocky Dunlap <rocky.dunlap@xxxxxxxx> wrote:
I am attempting to create an Eclipse synchronized project that will sync my local files to a NASA supercomputer that is only accessibly through a secure login node.  There are two levels of authentication - first the login node, then the cluster node, both require a password. Typically, you would set up a SSH tunnel for this sort of thing, although it appears that opening a separate channel for the tunnel is explicitly disallowed by the NASA security policy.

Do I have any options for syncing?  Or do I have to do some kind of manual file transfer when I want to compile on the remote machine?

Rocky



--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309

Back to the top