{% extends "templates/home.html" %} {% block stylesheet %} {{ super() }} {% endblock %} {% block main %}
Add your public key into ~/.ssh/authorized_keys in your jupyter notebook. [Doc]
Copy and paste the example below into your ~/.ssh/config. Then replace ~/.ssh/id_rsa with your private key location.
HOST {{ default_server.ssh_config['hostname'] }}
User jovyan
Hostname {{ default_server.ssh_config['hostname'] }}
Port 22
ForwardAgent yes
ProxyCommand ssh -W %h:%p -i ~/.ssh/id_rsa limited-user@{{ default_server.ssh_config['host'] }} -p {{ default_server.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 {{ default_server.ssh_config['hostname'] }}