Sudospawner + SSHSpawner

For reasons, I want to run jupyterhub on one server, and the notebook servers on a pool of other servers. I’ve got jupyterhub working successfully via SudoSpawner and serving notebooks on the same host, but now I’m trying to get it to serve the notebooks on another host.

SSHSpawner doesn’t look very mature, but it certainly looks thorough enough to do the job, except that I obviously I cannot take the easy route of subclassing both and calling both start methods, that’s not going to work.

Has anyone else done this? Can anyone give me advice on how to make a hybrid where SudoSpawner’s do() gets called, which calls its mediator, and then somewhere in there I call most of what SSHSpawner does, and… I’m a little out of my depth, so pointers would be very much appreciated.

It sounds quite complicated! Are you willing to consider other solutions to your problem?

If you are then it would be helpful to describe your overall requirements, including why you want the JupyterHub process on one server but the singleuser servers on another, why you’d like to use sudospawner vs anything else, what your technical constraints are, and any other potentially relevant information.