Disable jupterHub terminals

How do I disable jupterHub terminals because I want to avoid some risks

1 Like

You can set c.NotebookApp.terminals_enabled = False to disable terminals in the UI, but this doesn’t mitigate any risks. There’s nothing that can be done in a terminal that cannot be done from a regular notebook, including start more terminals.

1 Like

Thank you very much for your reply, but I want to ask how to modify the configuration file jupyterhub_ Config.py to disable the jupyterhub terminal

It would be the same, but not in jupyterhub_config.py. Terminals are not configured by JupyterHub, since they are part of the single-user server. You can put the above config somewhere your single-user servers will load it, which will depend on your Spawner. /etc/jupyter/jupyter_notebook_config.py is a place for system-wide notebook server config. This might be on the host system for local spawners, or in an image for container-based spawners such as docker or kubernetes.

You can specify the same option in jupyterhub_config.py to be passed on the command-line with:

c.Spawner.args = ["--NotebookApp.terminals_enabled=False"]
2 Likes

Thank you so much!!!

Hello, I am based on this configuration: jupyterhub-the-hard-way/installation-guide-hard.md at 35ddfb49ad81771551c6549696ccec960564d5e4 · jupyterhub/jupyterhub-the-hard-way · GitHub, But I have configured c.notebookapp. terminals_enabled = False in jupyterhub_config.py as you said, it still does not work.

I try ‘pip uninstall -y terminado’, it is working.But it util can use in notebook.How can i do?