Не удается запустить ноутбук Jupyter удаленно на HPC с помощью SSH - PullRequest
0 голосов
/ 30 июня 2018

Я вошел в HPC, используя:

ssh -p 2222 user@hpc.edu

и затем запустил ноутбук Jupyter, используя:

jupyter notebook --no-browser --port=9999

Я получил URL:

http://localhost:9999/?token=0518475c55eaafb82abce7d2d5344b48174012

Затем я попытался получить доступ к ноутбуку Jupyter удаленно, используя мой компьютер:

ssh -p 2222 user@hpc.edu -L 9999:localhost:9999 -N

В соединении отказано по истечении длительного времени:

channel 2: open failed: connect failed: Connection refused

Я помню, раньше имел возможность получить доступ к ноутбуку, не ставя

-p 2222 

в команде ssh в любом месте. Но теперь я должен сделать это для удаленного ssh. Требуется ли какое-либо другое изменение команды для удаленного доступа к ноутбуку Jupyter?

EDIT:

Я добавил -v -v к команде, которую выполнил на моем компьютере. Вот что он говорит:

password: debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 0 debug1: Authentication succeeded (keyboard-interactive). Authenticated to bridges.psc.edu ([128.182.108.57]:2222). debug1: Local connections to LOCALHOST:9999 forwarded to remote address localhost:9999 debug1: Local forwarding listening on ::1 port 9999. debug2: fd 4 setting O_NONBLOCK debug1: channel 0: new [port listener] debug1: Local forwarding listening on
127.0.0.1 port 9999. debug2: fd 5 setting O_NONBLOCK debug1: channel 1: new [port listener] debug2: fd 3 setting TCP_NODELAY debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1 debug1: Connection to port 9999 forwarding to localhost port 9999 requested. debug2: fd 6 setting TCP_NODELAY debug2: fd 6 setting O_NONBLOCK debug1: channel 2: new [direct-tcpip] channel 2: open failed: connect failed: Connection refused debug2: channel 2: zombie debug2: channel 2: garbage collecting debug1: channel 2: free: direct-tcpip: listening port 9999 for localhost port 9999, connect from 127.0.0.1 port 54542 to
127.0.0.1 port 9999, nchannels 3 debug1: Connection to port 9999 forwarding to localhost port 9999 requested. debug2: fd 6 setting TCP_NODELAY debug2: fd 6 setting O_NONBLOCK debug1: channel 2: new [direct-tcpip] channel 2: open failed: connect failed: Connection refused

Я пытался следовать этому: http://ipyrad.readthedocs.io/HPC_Tunnel.html

1 Ответ

0 голосов
/ 05 сентября 2018

Этот работает для меня. Сначала запустите Jupyter со своего сервера, используя:

jupyter notebook --no-browser --port=7002

Затем со своего локального компьютера вы можете туннелировать до Jupyter, используя следующий код

ssh -N -f -L localhost:7001:localhost:7002 user@hpc.edu

Теперь вы можете получить доступ к Jupyter с вашего локального компьютера, просмотрев localhost:7001

Более подробную информацию можно найти здесь: здесь

...