{% if enable_kernel_gateway %}
  {% endif %} {% if enable_ssh_server %}
 
🔑 From your jupyter notebook

Add your public key into ~/.ssh/authorized_keys in your jupyter notebook. [Doc]

💻 From your local machine

Copy and paste the example below into your ~/.ssh/config. Then replace ~/.ssh/id_rsa with your private key location.

HOST {{ ssh_config.hostname }}
  User jovyan
  Hostname {{ ssh_config.hostname }}
  Port 22
  ForwardAgent yes
  ProxyCommand ssh -W %h:%p -i ~/.ssh/id_rsa limited-user@{{ ssh_config.host }} -p {{ ssh_config.port }}
  IdentityFile ~/.ssh/id_rsa
  StrictHostKeyChecking no
  UserKnownHostsFile=/dev/null

After these steps, you will be able to successfully connect to your notebook.

$ ssh {{ ssh_config.hostname }}

{% endif %}
WARNING: You choose a instance with GPU resource, but the image may not be optimized for GPU.