1.ssh command In Linux, you can log in to another server through the ssh command. Open two Linux virtual machines, one Linux01 with an IP address of 192.168.226.128 and the other Linux02 with an IP address of 192.168.226.129. After booting up, enter in the linux01 terminal: ssh 192.168.226.129, then you will be prompted to enter the login password of linux02. After entering, you can log in to linux02 on linux01 and perform command operations. There are two ways to use ssh commands ssh ip address (default is root user) Log in as root user ssh username@ip address to log in as the specified user 2. Problems solved by keyless login Now if you want to log in to the linux02 system on linux01, you need to manually enter the password after the ssh IP address to enter the linux02 server. However, after configuring key-free login, you can log in by directly entering the ssh command without manually entering the password. Key-free login solves the problem of password-restricted access between clusters. What is a cluster? A cluster is a lot of servers doing one thing (the servers are connected and can transfer data) 3. Configure key-free login: All servers in the cluster need to be configured with a key-free key. It is not enough to configure only one server and then use it on other servers. 3.1 Generate private and public keys on server linux01 +--[RSA 2048]----+ | .o. | | .E. | | .. . | | o . | | S o .. | | o oooo | | . o.+=. | | .B... | | .+.=+. | +-----------------+ 3.2 Copy a public key on your computer and generate a copy on other servers, This process requires manual entry of a password once, so that a public key is placed on both the linux01 server and the linux02 server. The public key is used to implement key-free login. The following information is displayed to indicate successful configuration:
3.3 Configure hostname mapping in linux01's hosts: 3.4, repeat the above steps to configure linux02. If there are multiple servers, copy the public key on each server. The ip mapping should also be configured for each host. Finally, test that you can log in directly by entering the ssh ip address without entering a password. File transfer: scp -r File/folder to be copied Target IP address or hostname: Target folder path To send the apps folder on linux01 to You can transfer files The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Use Element+vue to implement start and end time limits
>>: Detailed explanation of basic data types in mysql8.0.19
This article example shares the specific code for...
MySQL 5.7.17, now seems to be the latest version,...
Table of contents Preface Asynchronous loading Pa...
Introduction to AOP The main function of AOP (Asp...
Web design, according to personal preferences and ...
Brotli is a new data format that can provide a co...
One day, the leader put forward a requirement to ...
1. The organizational structure of the hypertext d...
--Homepage backup 1.txt text 2. Scan the image 3. ...
When starting MongoDB, the prompt is: error while...
This article introduces the implementation code o...
Table of contents 1. Images 1. What is a mirror? ...
What are the shutdown commands for Linux systems?...
I'm currently working on my own small program...
1. Add a new user Only allow local IP access crea...