How to set up jupyterhub for servers in private network?

My lab has

(public address:, host name:
lab-gateway (private address:
 |__labgpu01 (private address:
 |__labgpu02 (private address:


  • I am a user without sudo
  • Each user has their home, and are the same for every servers in the network.

How can I setup jupyterhub so I can use those gpus at my home ?

  • which spawner should I use ?
  • tutorial suitable for this situation ?

Extra info

  1. I always do this to get into gpuserver
localuser@local ~ $ ssh lab
remoteuser@lab-gateway ~ $ ssh labgpu01
remoteuser@labgpu01 ~ $

with .ssh/config

Host *
    AddKeysToAgent yes
Host lab
    User remoteuser
  1. To access the gpuserver from our home, other suggest me use ssh tunnel
remoteuser@lab-gateway ~ $ ssh -L 8888:localhost:9000 -t ssh -L 9000:localhost:9000 labgpu01
remoteuser@labgpu01 ~ $ jupyter notebook


c = get_config()
c.NotebookApp.password = 'sha1:...'

and then in my browser localhost:8888
but I just succeed once and then I don’t what I did, this way didn’t work anymore…

You might try SSHSpawner which launches notebook servers on remote machines using SSH. I believe that should work with the config you have.

1 Like