레이블이 ssh port forwarding인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ssh port forwarding인 게시물을 표시합니다. 모든 게시물 표시

2017년 6월 21일 수요일

Jupyter notebook from the remote client


Server (jupyter notebook 구동) :
(server)$ jupyter notebook --no-browser --port=8888


Client :
(client)$ ssh -N -f -L localhost:8888:localhost:8888 user@ipaddress of server(client)$ open -a safari http://localhost:8888


localhost:8888(로칼):localhost:8888(remote)
원격 포트를 바꾸고자할때 사용할수는 있음

예를들면
localhost:8888:localhost:8889
으로 설정하면 원격 8889를 local 8888로 (remote port 8889 to local port 8888)

Cygwin을 사용해도 됨
(client)$ ssh -N -f -L localhost:8888:localhost:8888 user@ipaddress of server

ssh 포트가 포워딩되는 경우
ssh 포트 지정하듯
ssh -N -f -L localhost:8888:localhost:8888 user@ip_address_server -p SSH_PORT_NUMBER


Token authentication 문제가 나오면 server에 접속해서
(server)$ jupyter notebook list 를 하고 보이는 토큰 키를 넣어주면 끝.