다음글 참조

https://medium.com/@apbetahouse45/how-to-run-jupyter-notebooks-on-remote-server-part-1-ssh-a2be0232c533

 

How to run Jupyter Notebooks on remote server — Part 1 (SSH)

A simple way to run python code on remote machines through Jupyter Notebook interface.

medium.com

 

software 설치/제거 메뉴에서

1. jupyter interactive notebook 찾아서 설치
2. interactive computing environment (metapackage) 설치

 

3. 환경설정
$ jupyter notebook --generate-config

 

4. 암호설정
$ jupyter notebook password

Enter password: ****

Verify password: ****

[NotebookPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_notebook_config.json

 

5. 해시된 패스워드 준비

In [1]: from notebook.auth import passwd

In [2]: passwd()

Enter password:

Verify password:

Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

이 패스워드를 jupyter_notebook_config.py에 다음과 같은 항목에 넣는다.

 

c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

 

일단 이렇게 하면 앞의 jason 파일은 확장자를 고치고( *.org 처럼) 없앤다.

 

6. SSL 접속을 위한 준비

$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem

이렇게 mykey.key, mycert.pem 2가지 파일을 만든다.

 

5. 외부접속을 위한 설정 파일 수정

.jupyter/jupyter_notebook_config.py를 수정

c.NotebookApp.allow_origin='*'
c.NotebookApp.allow_remote_access=True
c.NotebookApp.open_browser=False

c.NotebookApp.certfile = '/absolute/path/mycert.pem'

c.NotebookApp.keyfile = '/absolute/path/mykey.key'

c.NotebookApp.ip = '*'

c.NotebookApp.password = u'sha1:bcd259ccf...'

c.NotebookApp.open_browser = False

c.NotebookApp.port =8888

 

참고
1. https://jupyter-notebook.readthedocs.io/en/stable/public_server.html

2. https://m.blog.naver.com/seodaewoo/221710100262



'Raspberry Pi' 카테고리의 다른 글

원격 ssh로 라즈베리파이 sdcard 백업하기  (0) 2020.01.25
How to run Jupyter Notebooks on remote server — SSH  (0) 2020.01.21
라즈베리파이4  (0) 2020.01.17
라즈베리파이4 방열판 효과  (0) 2020.01.16
fail2ban  (0) 2020.01.15

다음과 같은 간단한 명령로 만들수 있다. 단지 공인인증서가 아니고 사설인증서라는 것뿐이다
내가 만든 것은 내가 인정하니 상관없다.

1번 사이트에 나와있는 것을 순서대그 그대로 따라하면 된다. 여기에 apache2나 nginx 용으로 만들려면 참고2에 나와 있는 것처럼 인증서를 체인순서로 합친 것을 사용해야 된다.

 

Reference

1. https://juno.sh/ssl-self-signed-cert/  jupyter server 용으로는 여기 나와 있는데로만 하면 된다.

 

Accessing Jupyter on iOS over HTTPS

Follow these steps to prepare a self-signed SSL/TLS certificate for accessing Jupyter Notebook server from your iPhone or iPad over HTTPS

juno.sh

2. https://juno.sh/ssl-self-signed-cert/ nginx와 같은 httpd 서버에는 unified pem을 만들어야 한다.

 

Accessing Jupyter on iOS over HTTPS

Follow these steps to prepare a self-signed SSL/TLS certificate for accessing Jupyter Notebook server from your iPhone or iPad over HTTPS

juno.sh

 

3. https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/

 

How to Create Your Own SSL Certificate Authority for Local HTTPS Development

In my last article I described how to generate your own self-signed SSL certificates and add them to macOS Keychain so that your browser doesn’t give you a privacy error.… Read more

deliciousbrains.com

3. https://blog.naver.com/husheart/221688173365

 

OpenSSL 로 ROOT CA 생성 및 SSL 인증서 발급

https://www.lesstif.com/pages/viewpage.action?pageId=6979614개요 웹서비스에 https 를 적용할 경우 S...

blog.naver.com

 

'Ubuntu, Bash' 카테고리의 다른 글

nginx authentification  (0) 2020.01.23
서비스 확인 및 재시작  (0) 2020.01.05
ufw 기본적인 사항  (0) 2020.01.05
변수와 문자열 연산자  (0) 2019.12.26
shell script의 명령 인자 숫자 및 배열  (0) 2019.12.25

+ Recent posts