Linux network settings 3-notes for using the ssh tool

Source: Internet
Author: User
Linux network settings 3 & mdash; note when using the ssh tool 1. how does the ssh tool use ssh (SecureShellClient) to install it on windows, while on linux there is a service called sshd, this service occupies port 22, which is started by default. However, Port 22 is not trusted by default and needs to be set manually... linux network settings 3-ssh tool usage note 1. ssh tool usage principle ssh (SecureShellClient) is installed on windows, while on linux there is a service called sshd, this service occupies port 22, which is started by default. However, Port 22 is not trusted by default and must be set manually. This explains the problems encountered in using ssh. Question 1: windows and linux can be pinged, but the ssh tool cannot connect. Answer 1: Because the ping address directly finds port 80, rather than Port 22, ping the port 22 may fail.
Question 2: netstat-anp | more found that sshd is started, but the ssh tool cannot connect. answer 2: port 22 is blocked by the firewall. 2. Solution to connection failure using ssh tools. 1. solve sshd service problems. ps aux | grep ssh check whether ssh is enabled, or netstat-anp | more to check whether Port 22 is listening. If it is not started, you can enter the service to start sshd or run the sudo ssh start command. If this service is not reported, it indicates that ssh is not installed and openssh is installed. Method 2: Open the/etc/sysconfig/iptables file of port 22 and enter the command vi/etc/sysconfig/iptables, add-A XXXXXXX-INPUT-p tcp-m tcp -- dport 22 -- syn-j ACCEPT to open port 22. Of course, when installing Linux, you can set the sshd service as trusted when setting the firewall. III. knowledge about Linux firewall 1. it takes effect permanently and will not be enabled after restart: chkconfig iptables on disabled: chkconfig iptables off 2 takes effect immediately. after restart, it is enabled: service iptables start disabled: the service iptables stop command must be used to enable or disable other services in Linux.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.