1. Introduction
For system security, it is sometimes necessary to modify the SSH default port. The modification method is as follows:
Vim/etc/ssh/sshd_config
Add two port
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker EXP $
# This is the SSHD server system-wide configuration file. The
# Sshd_config (5) for the more information.
# This sshd is compiled with Path=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the ' Default Sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. uncommented Options Change A
# default value.
Port 22//Before this, there's a # number in front.
Port 8284
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress::
# Hostkey for protocol version 1
#HostKey/etc/ssh/ssh_host_key
# Hostkeys for protocol version 2
#HostKey/etc/ssh/ssh_host_rsa_key
#HostKey/etc/ssh/ssh_host_dsa_key
Restart the sshd service
/etc/init.d/sshd restart
If the firewall is turned on, you need to modify the firewall settings.