Revision history [back]
If you can establish an ssh tunnel for ssh itself through the gateway then it'll probably work. You'll need two tunnels, one from your local machine to a port on the gateway and another from that port on the gateway to the target host's port 22 (the default port for ssh). If that works you can then ssh to the selected port on your localhost and actually end up on the target machine.
Then you should be able to use that with Wing's remote development support if you check on the "User SSH Tunnel for username@localhost" option under the Advanced tab of the remote host configuration.I don't have a good way to try this here right now, but here is a guess at what might work.
First establish a tunnel to the gateway from your localhost:
ssh -L 50022:localhost:50022 username@gateway
This will get you a prompt on the gateway and start forwarding port 50022 on your local host to port 50022 on the gateway. Then type the following at the prompt on the gateway to establish a tunnel to the target host:
ssh -N -L 50022:localhost:22 username@targethost
This will foward port 50022 from the gateway to port 22, the default port for ssh, on the target host but the -N option tells it not to give you a prompt on the target host (remove that option if you do want one). Now you should be able to ssh directly to the target host from your local host like this:
ssh -p 50022 username@localhost
Note that you can also do both ssh commands on one line typed on your local host to establish both hops in the tunnel at the same time:
ssh -L 50022:localhost:50022 username@gateway ssh -N -L 50022:localhost:22 username@targethost
Note that I randomly chose to use port 50022 for the forwarding, which should work if the port is available on the local and gateway hosts. If not, you may need to change that. The reason it's not 22 is that you don't want that tunnel to conflict with the existing ssh services on your local host and gateway. Also, obviously, username@gateway and username@targethost need to be set to the correct ones for your systems. But don't change 'localhost' since that is correctly referring to the localhosts on which the ssh command is being run (your local host and your gateway host for the second one).
If you can establish an ssh tunnel for ssh itself through the gateway then it'll probably work. You'll need two tunnels, one from your local machine to a port on the gateway and another from that port on the gateway to the target host's port 22 (the default port for ssh). If that works you can then ssh to the selected port on your localhost and actually end up on the target machine.
Then you should be able to use that with Wing's remote development support if you check on the "User SSH Tunnel for username@localhost" option under the Advanced tab of the remote host configuration.I don't have a good way to try this here right now, but here is a guess at what might work.
First establish a tunnel to the gateway from your localhost:
ssh localhost:ssh -L 50022:localhost:50022 username@gateway
This username@gatewayThis will get you a prompt on the gateway and start forwarding port 50022 on your local host to port 50022 on the gateway. Then type the following at the prompt on the gateway to establish a tunnel to the target host:
ssh host:ssh -N -L 50022:localhost:22 username@targethost
This username@targethostThis will foward port 50022 from the gateway to port 22, the default port for ssh, on the target host but the -N option tells it not to give you a prompt on the target host (remove that option if you do want one). Now you should be able to ssh directly to the target host from your local host like this:
ssh this:ssh -p 50022 username@localhost
Note username@localhostNote that you can also do both ssh commands on one line typed on your local host to establish both hops in the tunnel at the same time:
ssh time:ssh -L 50022:localhost:50022 username@gateway ssh -N -L 50022:localhost:22 username@targethost
Note username@targethostNote that I randomly chose to use port 50022 for the forwarding, which should work if the port is available on the local and gateway hosts. If not, you may need to change that. The reason it's not 22 is that you don't want that tunnel to conflict with the existing ssh services on your local host and gateway. Also, obviously, username@gateway and username@targethost need to be set to the correct ones for your systems. But don't change 'localhost' since that is correctly referring to the localhosts on which the ssh command is being run (your local host and your gateway host for the second one).