본문 바로가기

시스템/Git, Docker

원격 서버에 Jupyter NoteBook으로 접근하기

원격 리눅스 서버에 XRDP를 설치하면 '원격 GUI 접속'이 되지만, 잘 안되는 경우가 많다.

차선으로 생각할 수 있는 방법이 원격 서버에 Jupyter Notebook으로 접근하는 것이다.

 

1. 원격 서버에서 열어줄 포트 번호를 지정한다.

- 아래 예시에서는 8890 포트로 들어오는 것은 Jupyter Notebook으로 연결하겠다는 것이다.

# Replace <PORT> with your selected port number
jupyter notebook --no-browser --port=<PORT>

ex)
jupyter notebook --no-browser --port=8890 --allow-root

 

2. 로컬 머신에서 SSH로 원격 서버에 접속한다.

# Replace <PORT> with the port number you selected in the above step
# Replace <REMOTE_USER> with the remote server username
# Replace <REMOTE_HOST> with your remote server address
ssh -L 8080:localhost:<PORT> <REMOTE_USER>@<REMOTE_HOST>

ex)
ssh -L 8080:localhost:8890 <REMOTE_USER>@<REMOTE_HOST>

 

3. 로컬 포트로 접속한다.

 http://localhost:8080/

 

 

참조1: https://docs.anaconda.com/anaconda/user-guide/tasks/remote-jupyter-notebook/

참조2: https://ljvmiranda921.github.io/notebook/2018/01/31/running-a-jupyter-notebook/

반응형

'시스템 > Git, Docker' 카테고리의 다른 글

Dockerfile로 부터 Container 생성  (0) 2022.04.06
commit --amend  (0) 2021.08.24
git (init , add, commit, reset) 설명  (0) 2021.06.03
Git pull/push 시 Password 물어보지 않도록 설정하기  (0) 2021.04.29
Git 명령어 정리  (0) 2020.11.06