ABKYH 发表于 2018-5-25 08:11:01

linux—SSH更改端口

# vi /etc/ssh/sshd_config


#   $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $


# This is the sshd server system-wide configuration file.See
# sshd_config(5) for more information.


# This sshd was 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 63108
#Protocol 2,1
Protocol 2
#AddressFamily any
#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


# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768


# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
"/etc/ssh/sshd_config" 119L, 3325C


更改完成如果防火墙开启,一定注意添加防火墙规则,否则无法远程!!!
页: [1]
查看完整版本: linux—SSH更改端口