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 {{ 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 }}