Hi,
I have a mind-boggling issue trying to connect via ssh to a jupyter notebook with jupyter 4.2.0 under conda. The config file of jupyter is the default one. For some reason when I fire up jupyter no token is shown, while trying to access it gives the token login page with "Token authentication is enabled".
jupyter notebook list outputs
Currently running servers:
http://localhost:8888/ :: /users/myname/.jupyter
What could cause this? Is there a way to run jupyter in verbose mode or something like this to see what is happening?
Thank you
Try updating the notebook package to the latest in all relevant environments - if you're not seeing the token in jupyter notebook list, that sounds like it's finding the command in an older version.
There's a --debug option to see more logging, but it should show the token in the default logging, so if it doesn't, I doubt the debug flag will help.
If you're still stuck, you can configure a password by running jupyter notebook password - that should replace the token.
As a workaround I use jupyter notebook list --json
I've been using jupyter notebook for ~3yrs and I had to come to this thread to solve the issue.
As a suggestion, help message of jupyter list could be changed from
list
List currently running notebook servers.
to
list
List currently running notebook servers and related information (eg. tokens and addresses).
I am facing a similar issue and haven't been able to retrieve the token.
My Jupyter notebook is version 6.0.0. I have ssh access to the remote server and the notebook is password protected. However I also need a token so I can connect Google Colab to it.
jupyter notebook list
does not show any token.
Also,
jupyter notebook list --json
has an empty string in the token field.
How do I enable token authentication ?
Hi @Gateway2745 - thank for your question.
You can't configure notebook to use passwords and auto-generated tokens. To get the dual behavior you want, you'll need to configure a fixed token in the configuration file. This enables either a password or a token to be entered at login, or you can formulate a URL with the token parameters ?token=<configured-token>.
Your configuration file entries should resemble something akin to:
{
"NotebookApp": {
"password": "sha1:65e37f0d14de:5249cef964e888cf5b8f9cc99c8735e01c8e0f2f",
"token": "10fd01baf5c7ff2db46cb937e42e1da8d19bd49023216e2b"
}
}
Application startup should present an elipsis for the token...
[I 07:39:51.750 NotebookApp] http://localhost:8888/?token=...
[I 07:39:51.750 NotebookApp] or http://127.0.0.1:8888/?token=...
[I 07:39:51.750 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Yet, jupyter notebook list will display the token, and indicate passwords are enabled:
{"base_url": "/", "hostname": "localhost", "notebook_dir": "/Users/kbates/notebooks", "password": true, "pid": 49369, "port": 8888, "secure": false, "token": "10fd01baf5c7ff2db46cb937e42e1da8d19bd49023216e2b", "url": "http://localhost:8888/"}
I'm going to close this issue since its quite old and no changes have been implied. We can re-open should we find that necessary, but a new issue would probably be the suggested approach at that time. Thank you.
Most helpful comment
Try updating the
notebookpackage to the latest in all relevant environments - if you're not seeing the token injupyter notebook list, that sounds like it's finding the command in an older version.There's a
--debugoption to see more logging, but it should show the token in the default logging, so if it doesn't, I doubt the debug flag will help.If you're still stuck, you can configure a password by running
jupyter notebook password- that should replace the token.