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"]
1 Like

Thank you so much!!!