Home > System Tutorial > LINUX > body text

Using PuTTY for port forwarding and application startup

WBOY
Release: 2024-01-02 21:44:57
forward
607 people have browsed it

After penetrating through the intranet, generally speaking, when we access the machine in the intranet, the next command in Ubuntu is:

ssh name@Alibaba Cloud -p 6000 can be accessed, where -p represents the port number; similarly, the corresponding port number can be modified through putty under windows to access the intranet, as shown in the figure below

Using PuTTY for port forwarding and application startup

port should write the port number corresponding to the Alibaba Cloud transfer server; however, if you start jupyter notebook on the server side, jupyter will assign a port to you. Because it is called remotely, if you edit jupyter notebook locally , port mapping is required, which means that the port assigned to jupyter notebook on the server side needs to be mapped to the local port, which is also a command in ubuntu:

ssh -L 8888:localhost:8888 name@ip -p 6000, the first 8888 is our local port, the latter 8888 is the port on the server, and the port after -p is used for intranet penetration port. Using putty under windows requires the following configuration:

Using PuTTY for port forwarding and application startup

Similarly, the upper port is the local port, and the lower port is on the server. Click add. Be sure to click add. After accessing the server, the terminal starts jupyter notebook

I found that the port assigned by jupyter notebook is 8889, which is extremely embarrassing, as shown below

Using PuTTY for port forwarding and application startup

So, the general way I do it is to log in to the server first, then open the jupyter notebook and check the assigned port number. Then when performing port mapping, the loaclhost of the server must be written 8889, as shown below

Using PuTTY for port forwarding and application startup

Then click in and start jupyter notebook. At this time, the port assigned by jupyter is the same as 8889 in the picture above. Then, enter: localhost:8888 in the browser. The 8888 here is actually local because it has been connected with The 8889 link of the server, so all jupyter content in 8889 will be forwarded to this port, as shown below, enter the token

Using PuTTY for port forwarding and application startup

Using PuTTY for port forwarding and application startup

The above is the detailed content of Using PuTTY for port forwarding and application startup. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!