The so-called 22 port is what we often say ssh port, when you are operating Linux, if you encounter problems with the network can not connect, then there may be a problem with port 22, below Xiaobian will introduce you to the way Linux repairs 22 ports.
The first 22-port modification method:
01 If you want to change the default SSH port (22), then you just modified: /etc /ssh /sshd_config in Port 22, Here to change 22 to the port you want to set up, but do not set the same port as the existing one, in case of unknown consequences.
02 If you want to limit the IP of SSH login, you can do the following:
First: modify /etc/hosts.deny, add sshd:ALL
and then: Modify: /etc/hosts.allow, set the following settings: sshd: 192.168.0.241
This will limit the IP of only 192.168.0.241 to log in to the LINUX machine via SSH. Of course, as a server, I don't have gnome and KDE installed, and many don't install it, which increases the security factor.
The second 22 port modification method:
First modify the configuration file
vi /etc/ssh/sshd_config
Find #Port 22 section, here Yes, the ID uses 22 ports by default, modified as follows:
Port 22 Port 50000 Then save and exit
Execute /etc/init.d/sshd restart
So the SSH port will Work at the same time with 22 and 50000.
Now edit the firewall configuration: vi /etc/sysconfig/iptables
Enable port 50000.
Execute /etc/init.d/iptables restart
Now use the ssh tool to connect to port 50000 to test for success. If the connection is successful, edit the sshd_config settings again and delete the Port22 inside.
The reason why the two ports are set first, and then the port is closed after the test is successful, in the process of modifying the conf, in the event of an unknown situation such as dropped calls, broken networks, misoperations, etc. It can be debugged through another port connection to prevent the connection from being sent to the computer room, which makes the problem more complicated and troublesome.
The above is the introduction of Linux repair 22 port method, this article describes two ways to modify 22 port, if you can not solve the problem after modifying port 22, then it is not a 22 port problem.
jenkins is an open software platform, and there are many software platforms in Linux systems, but Je
RHCS is a cluster in Red Hat system, which integrates many useful tools in RHCS. These tools of Red
Part of the Linux users who installed Red Flag Linux6.0 and Windows dual system, encountered some pr
Using shell scripts under Linux can easily implement multi-threaded operations. Not only can shell s
Ubuntu notebook can not be remotely restarted after closing the lid.
How to install and use Trickle in Linux
Linux how to use ControlPersist to speed up SSH connection speed
Oracle Linux 6.4 accidentally remove VG solution
How to deal with the database disappeared after modifying the root password of mysql under Linux?
How to solve the problem that the WeChat public platform webpage cannot play audio under Linux?
Linux boot error report to disable selinux policy?
Linux Shell text processing command summary
Ubuntu defragmentation command summary
Detailed method of configuring CentOS devices using Quagga software
How to solve Linux Chinese garbled?
The basic process of setting serial port properties in Linux system
Microsoft July 2015 Security Update Announcement: Win10 survived Win7/Win8.1 affected
Boot automatically login settings
Win7 desktop in the lower right corner of the small speaker shows red fork how to do
Now is the Apple era, Microsoft wants to use Win8 to recover the trend, difficult
What permissions do I need to join the domain?
How to set password in Win7 system
Q. Why doesn't Win7 have a beautiful boot animation? [Photo]
Update the download of WindowsXPSP2 upgrade package and then wait for
Win8 dual interface IE10 browser rich features to swim the Internet