AMH panel, as one of the Linux VPS host panels developed by the people, the current user volume is still relatively large, even since the new version of last year began charging a lot of controversy, but now basically tend to habits. Because the free version of version 4.2 is basically able to meet the general needs of the site users, if the money or need other functional applications can purchase a paid version.
Before the old left also have encountered in the use of AMH panel VPS, if there is a restart VPS or upgrade other applications, you may encounter a login ssh or SFTP when unable to connect, began to think it is accidental coincidence, Last week in captain told the original AMH panel port settings need to be loaded into the configuration file, if our VPS after the installation of the AMH panel to modify the SSH port, did not load the configuration file, there will be a reboot of the VPS caused by the failure to set the port.
Therefore, if we are ready to install the AMH panel environment in the Linux VPS host, we can refer to two ways.
First, modify the SSH port configuration before installing the AMH panel
After we upgrade the VPS system and some basic security measures, we can modify the SSH port before installing the panel, and then install the AMH panel after the setup is OK.
Second, how to set up after installing the AMH panel
Old left was also used to configure the port and some VPS details after the configuration panel is installed without problems. Then we can't set up a new port like the typical VPS environment, then save the port and we need to load it into the configuration file. Specifically as follows:
Modify the file, locate the port, change the default 22 to the port we need, and execute the command.
There is no problem with the corresponding execution command error, there are errors we will see the error prompt, is not the port and a number of conflicts, need to replace one.
B-Configure Port Save
/sbin/iptables-i input-p TCP--dport set port number-j ACCEPT;
It is useless for us to save directly, and we need to save it to the AMH configuration file/etc/amh-iptables.
In this way, we do not restart or modify the configuration file, will not cause the failure to set the port