Demonstration of the production process of lvm software under linux-linux operation and maintenance
The previous article introduced lvm, and today I will demonstrate the process of making lvm here. The production process of lvm has the following steps: Disk partition Use partitions to make pv Create vg with pv Split lv from vg Format lv and mount it to the directory for use Next, let’s complete the above process. Partition First, let’s look at the partition of the disk. # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 40G 0 disk ├─sda1 8:1 0 2M 0 part ├─sda2 8:2 0 1G 0 part /boot ├─sda3 8:3 0 1G 0 part [SWAP] ├─sda4 8:4 0 10G 0 part / └─sda5 8:5 0 100M 0 part sdb 8:16 0 1G 0 disk sdc 8:32 0 1G 0 disk sdd 8:48 0 1G 0 disk sde 8:64 0 1G 0 disk As you can see, there are 5 disks on my host, except for the sda disk, the other disks have not been partitioned yet, and the sda disk still has remaining space. Now, partition the other 4 disks as well. Use fdisk or gdisk tools for partitioning, and the specific process is omitted here. The information after partitioning is as follows: #…
What is ssh and how does it encrypt information-linux operation and maintenance
In the early days, the remote connection server used plaintext transmission software, such as telnet and RSH, and later they were all replaced by the ssh protocol. The SSH service can provide information encryption and then transmit the data, which greatly improves the security. SSH has two main functions: Ability to connect to remote hosts and manage host resources Able to transfer files, similar to ftp service SSH encryption Technology SSH uses asymmetric encryption technology. Readers who want to know more about symmetric encryption and asymmetric encryption, please Google. Asymmetric encryption is mainly accomplished through the public key and private key. The public key encrypts the information sent, and after receiving the information, the private key is used to decrypt the information. Public key (Public key): The act of encrypting the information sent to the host of the other party, so your host public key Can be given to another host that wants to communicate. Private key (Private key): When the remote host sends the information encrypted with the public key to the current host, the current host uses its own private key to decrypt the information . Remember, your private key must not be known to other hosts. The…
What are the functions of the ssh service-login to remote hosts, sftp, and backup of files in different places-linux operation and maintenance
Today, I will introduce several applications of ssh to you. Common applications include using ssh to connect to remote servers, using sftp to transfer files, and using ssh to perform remote backup. Connect to remote host Connect to a remote server This is our most commonly used function, connect to a remote server, and then manage the server. If your client is windows, then you need to install terminal tools, such as xshell, Terminator, Tmux, etc., and then use these terminal tools to connect to the remote server. If the client is Linux, you can use the ssh command directly. Common command usage is given below Connect to remote host ssh [account@]IP [- p specified port] Do not log in, directly send a command to the remote server to execute the ssh -f [account@]IP [-p specified port] command Let’s demonstrate the remote connection server # ssh 121.196.12.64 The authenticity of host '121.196.12.64 (121.196.12.64)' can't be established. ECDSA key fingerprint is SHA256:wx0RHE8fcCoad6YKw0Ex4NE+QjwRiTYxC2s2g/DqPUU. ECDSA key fingerprint is MD5:43:2c:7a:12:24:1d:86:3a:b0:a0:b7:95:c2:cf:7b:ab. Are you sure you want to continue connecting (yes/no)? When connecting for the first time, you will be asked if you want to continue connecting, enter yes here. After entering yes, you will be…
How to configure the ssh service so that you can connect to the remote host without entering the account password-linux operation and maintenance
We know that the ssh protocol can connect to a remote server by entering the account name and password. So, can you log in directly without entering the account number and password? The answer is yes, and in daily work, this requirement is also common. For example, if you use scp to do remote backup, and want to write scp into crontab, but you must not be able to enter the account password in crontab, then you need to log in without account password. ssh is an asymmetric encryption protocol with public and private keys. The public key is used to encrypt information. Each host will store the public keys of other hosts in the known_hosts file under the .ssh directory of its own home directory. If you want to do account-free password, the key point is this public key. Suppose a server host SERVER, a client CLIENT, the client wants to connect to SERVER without login. Then just append the client’s public key to the end of ~/.ssh/authorized_keys of the SERVER machine. The following two situations demonstrate how to log in without a password: The client is a windows system The client is a linux system The client is…