Deep Learning

Jupyter notebook 원격으로 사용하기

민토즈 2020. 10. 7. 15:30
300x250

- ssh로 원격 호스트에(Linux 기준) 접속 

  root로 login 접속 시 login access denied로 접속이 되지 않을 때, 원격 호스트에서 미리 설정 필요

  vi /etc/ssh/sshd_config에서 PermitRootLogin yes로 수정 후 service sshd restart 또는 시스템 재시작

 

- notebook을 사용할 디렉토리 위치를 생성 또는 이동

 

- jupyter notebook --no-browser --allow-root

  주피터 노트북을 루트 권한으로 실행 

 

- jupyter notebook에 접근할 수 있는 주소와 토큰이 생성

 

- 로컬 computer에서, MS-DOS cmd or Linux terminal을 열고

  ssh -N -f -L localhost:8888:localhost:8888 root@your_remote_host_name 입력

 

- 크롬/브라우저를 열어서, localhost:8888 입력 

 

- password 또는 token 입력해서 로그인 

 

- remote 환경에서 jupyter notebook을 사용 

300x250