The first type:
01 If you want to change the default SSH port (22), then you just modify:/etc/ssh/sshd_config in Port 22, here to change the 22 to their own port to set the line, but do not set and now have the same port, oh, in case of unknown consequences.
02 If you want to limit the SSH login IP, then you can do the following:
First: Modify the/etc/hosts.deny and add the Sshd:all
Then: Modify:/etc/hosts.allow, in which the following settings: sshd:192.168.0.241
This allows you to limit only 192.168.0.241 of IP access to the Linux machine via SSH. Of course, as a server, I do not install GNOME and KDE, and a lot of things are not installed, so as to increase the safety factor.
The second type:
First modify the configuration file
Vi/etc/ssh/sshd_config
Find the #port 221 segment, here is the identity by default using 22 port, modified as follows:
Port 22
Port 10000
And then save the exit
Execute/etc/init.d/sshd Restart
This way the SSH port will work with both 22 and 50000.
Now edit the firewall configuration: vi/etc/sysconfig/iptables
Enable Port 10000.
Execute/etc/init.d/iptables Restart
Now, use the SSH tool to connect to port 10000 to test for success. If the connection is successful, edit the Sshd_config settings again and delete the Port22 inside.
The reason is set to two ports, test success and then close a port, is in order to modify the Conf in the process, in case of falling off, network, misoperation and other unknown circumstances, but also through another port connection debugging to avoid the connection must send people to the computer room, resulting in more complex problems.
[If you do not configure a firewall, you can also turn off the firewall (not recommended)]