Remote julia with gateway ssh

Hello,

I would like to connect to a computer in my university network with Juno to use a remote session. Currently I’m able to do it using a Ubuntu submachine on my local Windows. The thing is I have to go through a gateway to access any server in the network and the connection to the gateway uses a rsa key file that I have locally stored. I have a .ssh/config file setup with the ProxyCommand.

When I connect it goes like this:

  1. I type > ssh name_of_the_server_in_the_config_file
  2. I am prompted for a password to decrypt the rsa file
  3. I am prompted for the password of my remote session

ftp-remote-edit 's open SSH option offers only the possibility of direct ssh connection. Also, I have different usernames on the gateway and my remote machine.
I don’t know much about networking so ask me questions if I am not clear about what I need.

Many thanks.

1 Like

To go through a gateway you will use ssh port forwarding.
Download and run MobaXterm

This makes setting up port forwarding VERY easy.
lease download MobaXterm on your windows laptop and let us know when you have it running.

Okay It’s installed. What next ?

Great! On the top bar you will see Session Server Tools…
Click on Tunneling
New ssh tunnel
check Local Port Forwarding (this is the default)

SSH server is your gateway
SSH login in your username on that gateway
SSH port is 22

Forwarded port - your choice. Try maybe 8888
Remote server is your Jupyter notebook server
Remote port - 8888
Save

then go back to Tunnelling and start your tunnel

(I assume the Jupyter server is on port 8888)

I used 24 like here instead of 8888 because I don’t use Jupyter.

I clicked on the key next to the tunnel to select the rsa file and when I clicked the play button I was asked for the password. The tunnel seems to be running.

What does this do exactly ? Does it mean I can connect using other applications (i.e. Atom) to this port now ?

My bad. I read Jupyter when I should have seen Juno.
If I am correct, you should be able to connect to localhost port 24 with Juno and you will be on the remote machine.

Actually on a Linux system ports <1024 are privileged ports and you should have chosen a high number for the Local Client port. SO I would normally choose something high.
But on Windows - I have an embarrasing gap in my knowledge.

You have read this? Connecting to a Julia session on a remote machine · Juno Documentation

What MobaXterm is doing is setting up this for you, using a GUI

ssh -R <RemotePort>:localhost:<JunoPort> you@yourserver

Oh, and on Windows it advises to use 127.0.0.1 instead of localhost

Yes I saw that documentation but the terminology is a bit obscure to me, hence my post here. I must go but I’ll try that section tomorrow and tell you what.

Thanks already