Python---jupyter notebook remote access __python

Source: Internet
Author: User
Tags sha1 jupyter jupyter notebook

1,ssh Login Virtual machine (remote server)

2, build the configuration file

Jupyter Notebook--generate-config

3. Generate password This step is not actually used, because the password is not recommended to log in, modify the configuration file when the password recommended shielding

Open Ipython and create a ciphertext password:

In [1]: from Notebook.auth import passwd

In [2]: passwd ()
Enter Password:
Verify Password:
OUT[2]: ' sha1:86346e4cdf7a:c57960216df752e8ee5d3b9b8de6941640e15273 '

Copy the cipher down ' sha1:86346e4cdf7a:c57960216df752e8ee5d3b9b8de6941640e15273 '


4, modify the configuration file

$vim ~/.jupyter/jupyter_notebook_config.py
Make the following modifications:

c.notebookapp.ip= ' * '
C.notebookapp.password = U ' sha1:86346e4cdf7a:c57960216df752e8ee5d3b9b8de6941640e15273 '
C.notebookapp.open_browser = False
C.notebookapp.port =8888 #随便指定一个端口, using the default 8888 can also

Personal advice: Shielding the password that line, if not the server installation, but only their own virtual machine, their own virtual machine does not need security settings

5, start Jupyter notebook

6, the remote access server browser recommended the use of Firefox, virtual machine Linux installed by default is the Firefox browser

http://remote server ip:8888

7, if the login failed, it is possible that the server firewall settings problem, the simplest way is to establish an SSH channel locally:
Enter SSH username@address_of_remote-l127.0.0.1:1234:127.0.0.1:8888 in the local terminal
The remote Jupyter can be accessed directly from the localhost:1234. Username is typically root

The 7th step above is also not encountered in the virtual machine, if necessary can be closed firewall, or iptables-i input-j ACCEPT,

Precede the input chain with a full pass policy.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.