Hi Denis, I am not sure if this helps with your use case, but something I occasionally use to run Jupyter on a remote machine is a command like this:
ssh -L localhost:8888:localhost:8888 REMOTE -t sage -n jupyter --no-browser --port=8888 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/4c72e371-a070-4f8e-bf09-12003416d095%40googlegroups.com.