In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the method of RHCE bridge secret-free login and port number modification". In daily operation, I believe that many people have doubts about the method of RHCE bridge secret-free login and port number modification. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what is the method of RHCE bridge secret-free login and port number modification". Next, please follow the editor to study!
1. Configure bridging and grab packet verification
Bridging is the connection of several network interfaces on a machine. as a result, the messages received by one network card will be copied and sent to other network cards. So that the messages between the network ports can be forwarded to each other.
1. Create a bridging device and session
[root@lyzyyds ~] # nmcli c add type bridge con-name bridge1 ifname bridge1 ipv4.addresses 192.168.233.181 ipv4.method manual 24 ipv4.gateway 192.168.233.2 ipv4.dns 8.8.8.8
Connection 'bridge1' (cff2b8f4-c6cd-4424-ae4d-d2a0af6526ba) successfully added.
Successfully indicates that the configuration is successful
# configure IP address, gateway, dns and address acquisition method of software bridge Nic
2. Add devices and sessions to bridging devices
[root@lyzyyds ~] # nmcli c add type bridge-slave con-name brideg1_port1 ifname ens160 master bridge1
Connection 'brideg1_port1' (b615a309-bf5d-4aa7-b7cb-8a4d86a94074) successfully added.
Successfully indicates that the addition was successful.
3. Start the slave device session and bridge session
[root@lyzyyds ~] # nmcli c up brideg1_port1 starts from the device
[root@lyzyyds ~] # nmcli c up bridge1 bridging start
Packet capture verification
ICMP with ens160 indicates that our bridging has successfully accessed ens160 through bridging.
two。 Realize secret-free login
First, make sure there are two virtual machines.
The IP of one of them is 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
If you log in to 220 this virtual machine, you can log in without secret.
3. Modify login port: 22-"2222
First go to this configuration file
4. Root users are not allowed to log in remotely
First of all, you have to enter ssh first.
5. Create user sshuser1 and set password, and only allow sshuser1 remote ssh login
First create a new user and add a password
Change the yes of PermitRootLogin to no
Then restart the service
Then use ssh to connect and find that root users can't log in, but they can connect to sshuser1.
At this point, the study on "what is the method of RHCE bridging secret-free login and modifying port number" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.