If CentOS 7 is installed, port 22 is enabled by default.

SSH is short for Secure Shell. It is formulated by the Network Working Group of the IETF. SSH is a security protocol based on the application layer and transport layer. SSH is a reliable protocol that provides security for remote login sessions and other network services. \

The first step

Check whether the SSH software package is installed on the host

[root@localhost ~]# rpm -qa | grep ssh

Openssh server – 6.6.1 p1-12. El7_1. X86_64

Openssh – clients – 6.6.1 p1-12. El7_1. X86_64

Libssh2 1.4.3-8. El7. X86_64

Openssh – 6.6.1 p1-12. El7_1. X86_64

If not, install it

[root@localhost /]# yum install openssh-server

\

The second step

# Enable the SSH service

[root@localhost ~]# service sshd start

Redirecting to /bin/systemctl start  sshd.service

\

Check whether TCP 22 port is enabled

[root@localhost ~]# netstat -ntpl | grep 22

TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 17816/ SSHD

tcp6       0      0 :::22                   :::*                    LISTEN      17816/sshd

\

The third step

You can then use a terminal emulator (such as putty) to log in to the remote host

If you can’t connect to the SSH server on the client, it may be because of the firewall. Enter iptables -nl to check whether the SSH TCP 22 port is enabled:

[root@localhost ~]# iptables -nL\

You can remove rule entries from the firewall:

[root@localhost ~]# iptables -F

———-

SSH Client. PuTTY is recommended. mirror.neu.edu.cn/putty/