xshell Linux failure (non-network problems) is connected via ssh

+++++++++++++++++++++++++++++++++++++++++++

Title: xshell Linux failure (non-network problems) is connected via ssh

Time: June 20, 2019

+++++++++++++++++++++++++++++++++++++++++++

  When learning system firewall (iptables), personal firewall policy adjustments on their own to build a virtual machine (via iptables command is some strategy adjustments, some are adjusted by directly modifying the iptables policy configuration file). When finished once again adjust the firewall before connecting virtual machines via remote connection software xshell, suddenly found not connect properly, establish specific performance success is linked server, but can not log in to the console.

  First consider whether the policy configuration of sshd: sshd after inspection strategy has written iptables policy configuration file a.

  Second, it does not take into account whether the new load iptables configuration file: Use the command is still not properly connected service iptables restart after restart.

  Then consider the sshd configuration file may be opened authentication and DNS resolution mode results in a timeout connection, modify still can not connect to normal after sshd_config.

  Due to exclude the possible problems sshd, the most likely is the emergence in the iptables policy. So service iptables stop command to turn off the firewall, can be found xshell normally connected to the server. Thus finally able to locate where the problem.

  But after repeated strategy iptables for investigation, confirmed that the policy is absolutely no problem. So the question in the end there where it? This time remember the commonly used at school is a command iptables -F empty firewall policy. Taking into account the practical application, and then use the command cp / etc / sysconfig / iptables / bak backup firewall policy, and then use iptables -F empty firewall policy, save the firewall policy immediately after using the command service iptables save will be emptied into the policy configuration file. Even after these actions do not resolve the problem, but also retreated back to the original state of the problem. Then open the policy configuration file, I found it more than a name for the mangle table information, then delete the part of the information in the vim editor. Re-use the command service iptables restart restart firewall. Policy now and then backed up by copying the way of written policy profile. There is a policy profile default policy, for example: OUTPUT ACCEPT [118: 17055], the contents of all of the default policy in the square brackets to [0: 0]. Restart the firewall. We found that the problem has been resolved.

  Of course, this will lead to xshell not connect ssh phenomenon for many reasons, but this is only one solution. We hope to help solve practical problems.

Guess you like

Origin www.cnblogs.com/lv1572407/p/11057897.html