How to remotely connect linux to other linux

angryTom
Release: 2019-11-05 11:18:23
Original
9080 people have browsed it

How to remotely connect linux to other linux

How to remotely connect linux to other linux

1. Install sshd service on other Linux machines

If you are using a series of linux distributions such as redhat, fedora, centos, etc., then type the following command:

sudo yum install sshd 或
sudo yum install openssh-server
Copy after login

If you are using a series of linux such as debian, ubuntu, linux mint, etc. distribution, then type the following command:

sudo apt-get install sshd 或
sudo apt-get install openssh-server
Copy after login

and then follow the prompts to install.

2. Start the sshd service

service sshd start
Copy after login

The preparation work is complete. Here is how to connect.

3. SSH to connect other Linux machines

ssh root@ip -p 22
Copy after login

ip is the ip address of other Linux, -p is the port specified by other Linux sshd service, the default is 22

After pressing Enter, you will be prompted whether to continue the connection. Enter yes, and press Enter. Then enter the password of the root user on other Linux machines to log in successfully.

Note: The root user cannot log in successfully and needs to make the following settings on other Linux machines:

Edit the ssh configuration file

sudo vi /etc/ssh/sshd_config
Copy after login

Find and adjust PermitRootLogin and set it The parameter value is yes;

then restart the service service sshd restart.

Recommended learning: Getting started with linux

The above is the detailed content of How to remotely connect linux to other linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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!