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

The method of remote login to linux server in linux system

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

Share

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

The linux system logs in to the remote linux server:

There are many different protocols to choose from, and perhaps SSH is the "best". SSH is the abbreviation of secure shell, which means "safe shell". As an alternative to ancient remote login tools such as rlogin, rcp, and telnet, SSH authenticates the user's identity and encrypts the communication between the two hosts.

Here's how to log in to another linux server from linux using SSH.

(1) first, install OpenSSH first. Automatically install OpenSSH using the following command:

Sudo apt-get install ssh

Free video tutorials share: linux video tutorials

(2) secondly, there is a user account of the remote server. Here, a server user is created on the server side, and its password is set to server. Through the / etc/sudoers configuration file, the user has temporary access to root. As shown below:

(3) below, you can log in to the remote linux server with the following command:

Ssh-l login_name hostname

Here login-name refers to the user account, and hostname refers to the server hostname or IP address.

As shown in the figure, the IP address of server is 192.168.43.80.

Log in to the linux server:

In this way, log in to the host of 192.168.43.80. When logging in, SSH will ask the user to log in to the server user's password. Here, the key pair is used to log in. SSH will not ask for the password and log in directly by checking the matching of the key pair.

When you log in for the first time, SSH may prompt for the authenticity of the key and ask if you want to continue to establish a connection. Just answer yes to continue.

After logging in to the server host, you can do what you want, and when the work is done, you can use the exit command to end the SSH connection to the remote host.

The SSH server is enabled on port 22 by default. If the SSH service on the server side is not enabled on port 22, you can specify the port to connect to through the-p option of SSH.

Example:

Ssh-l server-p 202 192.168.43.80 # connect to port 202

These are the details of how to achieve remote login of the linux system to the linux server, please pay attention to other related articles!

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