1. Configure bridging and capture packets for verificationBridging is to connect several network interfaces on a machine. As a result, the messages received by one of the network cards will be copied to other network cards for sending. So that the messages between network ports can be forwarded to each other. 1. Create a bridge device and session [root@lyzyyds ~]# nmcli c add type bridge con-name bridge1 ifname bridge1 ipv4.addresses 192.168.233.181/24 ipv4.gateway 192.168.233.2 ipv4.dns 8.8.8.8 ipv4.method manual #Configure the IP address, gateway, dns and address acquisition method of the software bridge network card 2. Add devices and sessions to the bridge device [root@lyzyyds ~]# nmcli c add type bridge-slave con-name brideg1_port1 ifname ens160 master bridge1 3. Start slave device session and bridge session[root@lyzyyds ~]# nmcli c up brideg1_port1 Start from device [root@lyzyyds ~]# nmcli c up bridge1 Bridge startup Packet capture verification There is ICMP of ens160, which means that our bridge is successfully built and ens160 is accessed through the bridge. 2. Implement password-free loginFirst, make sure you have two virtual machines One of them has an IP of 162.168.233.220 Log in to this 220 in another virtual machine Generate a public key: Public key: id_rsa.pub Put our key in authorized_keys Log in to the virtual machine 220 again to log in without password 3. Modify the login port: 22-》2222First enter this configuration file 4. Do not allow root users to log in remotelyFirst, you need to enter ssh 5. Create user sshuser1 and set a password, and only allow sshuser1 to log in remotely via sshFirst create a new user and add a password Change PermitRootLogin's yes to no Then restart the service Then I connected with ssh and found that the root user could not log in, but I could connect by connecting to sshuser1 This is the end of this article about RHCE bridging, password-free login and port number modification. For more information about RHCE bridging, password-free login and port number modification, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL joint index effective conditions and index invalid conditions
>>: How to implement h5 input box prompt + normal text box prompt
1. mpstat command 1.1 Command Format mpstat [ -A ...
In the project, we often encounter the problem of...
Table of contents Million-level data processing s...
This article uses examples to describe how to cre...
We implement a red image style for the clicked bu...
Some common statements for viewing transactions a...
I have written many projects that require changin...
Open the folder C:\web\mysql-8.0.11 that you just...
Test: Chrome v80.0.3987.122 is normal There are t...
This article summarizes the notes for installing ...
Table of contents 1. Install the required environ...
1. Download Download address: https://dev.mysql.c...
When I first used docker, I didn't use docker...
1. I searched for a long time on the Internet but...
Table of contents Create an image File Structure ...