Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a remote management console using Jupyter Notebooks

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use Jupyter Notebooks to build a remote management console, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

SSH is a powerful remote management tool, but some details are not good enough. Writing a mature remote management console sounds like a painstaking task. Of course, someone in the open source community must have written something, right?

Yes, they have already written it. Its name is Jupyter. You might think that Jupyter is a tool that data scientists use to analyze ad click trends within a week. There's nothing wrong with that, it is, and it's a good tool. But this is only a portrayal of its surface.

About SSH Port Forwardin

Sometimes, you can access a server through port 22. Usually you can't connect to other ports. Maybe you are accessing SSH through another "fortress machine" with more access, or a network firewall that restricts the host or port. Of course, there are good reasons to restrict the scope of IP access. SSH is a security protocol for remote management, but it is quite unnecessary to allow anyone to connect to any port.

Here is an alternative: run a simple SSH port forwarding command to forward the local port to a "remote" local connection. When you run a SSH port forwarding command such as-L 8111 127.0.0.1 SSH port forwarding command, you are telling SSH to forward your local port 8111 to what it considers to be the "remote" host 127.0.0.1 Suzhou 8888. The remote host thinks 127.0.0.1 is itself.

Just like on Sesame Street, "here" is a subtle word.

The address 127.0.0.1 is the "here" you told the network.

Hands-on learning

This may sound confusing, but it's easier to run than to explain it.

$ssh-L 8111 44-Ubuntu SMP Tue Jun 127.0.0.1 40-generic 8888 moshez@172.17.0.3Linux 6ad096502e48 5.4.0-40-generic # 44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x 86 miles 64 The programs included with the Debian GNU/Linux system are free software;the exact distribution terms for each program are described in theindividual files in / usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY To the extentpermitted by applicable law.Last login: Wed Aug 5 22:03:25 2020 from 172.17.0.1$ jupyter/bin/jupyter lab-- ip=127.0.0.1 [I 22 from 04jupyter/bin/jupyter lab 29.771 LabApp] JupyterLab application directory is / home/moshez/jupyter/share/jupyter/lab [I 22 from 04jupyter/bin/jupyter lab 29.773 LabApp] Serving notebooks from local directory: / home/moshez [I 22 from 04jupyter/bin/jupyter lab 29.773 LabApp] Jupyter Notebook 6.1.1 is running at: [I 22:04:29 .773 LabApp] http://127.0.0.1:8888/?token=df91012a36dd26a10b4724d618b2e78cb99013b36bb6a0d1

The port forwards 8111 to 127.0.0.1 and starts the Jupyter on the remote host, which listens on 127.0.0.1.

Now you have to understand that Jupyter is lying. It thinks you need to connect to port 8888, but you forward it to port 8111. So, when you copy the URL to your browser, but before you click enter, change the port from 8888 to 8111.

Jupyter remote management console

This is your remote management console. As you can see, there is a "terminal" icon at the bottom. Click it to start a terminal.

Terminal in Jupyter remote console

You can run a command. Creating a file is displayed in the file browser next to it. You can click on the file and open it in your local editor.

Opening a file

You can also download, rename or delete files:

File options in Jupyter remote console

Click the up arrow to upload the file. Then upload the screenshot above.

Uploading a screenshot

For a small feature, Jupyter allows you to view remote images directly by double-clicking them.

These are all the contents of the article "how to build a remote Management console using Jupyter Notebooks". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report