Linux中Sshd服务配置文件优化版本(/etc/ssh/sshd_config)

#	$OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER#
Port 12525 #AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress :: # The default requires explicit activation of protocol 1
Protocol 2 # 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
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key # Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024 # Ciphers and keying
#RekeyLimit default none # Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO # Authentication:
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 3
MaxSessions 5 #RSAAuthentication yes
#PubkeyAuthentication yes # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys #AuthorizedPrincipalsFile none #AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes # To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes # Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no # Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes # GSSAPI options
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no
UsePAM yes #AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd yes
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
Compression yes
ClientAliveInterval 25
ClientAliveCountMax 3
#ShowPatchLevel no
UseDNS no
#PidFile /var/run/sshd.pid
MaxStartups 5
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none # no default banner path
#Banner none # Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS # override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server # Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server AllowUsers www ops admin

Linux中Sshd服务配置文件优化版本(/etc/ssh/sshd_config)的更多相关文章

  1. Linux系统 SSHD服务安全优化方案

      # 1. 修改默认端口 #Port 22 # 2. 修改监听协议,只监听某个或某些网络协议 #AddressFamily any AddressFamily inet # 3. 修改ssh只监听内 ...

  2. linux中DHCP服务配置文件/etc/dhcpd.conf详细说明

    DHCP服务的配置 dhcpd.conf 是DHCP服务的配置文件,DHCP服务所有参数都是通过修改dhcpd.conf 文件来实现,安装后dhcpd.conf 是没有做任何配置的,将/usr/sha ...

  3. Linux之sshd服务

    ---恢复内容开始--- ---恢复内容结束--- 一.linux中对服务管理与控制(以sshd为例) 1.什么是服务 可以用来给客户提供相关操作,对自己没有什么好处 2.用什么控制服务 系统初始化进 ...

  4. linux初学者-sshd服务

     linux初学者-sshd服务   在linux系统操作中,经常需要连接其他的主机,连接其他主机的服务是openssh-server,它的功能是让远程主机可以通过网络访问sshd服务,开始一个安全s ...

  5. linux中常用服务的安装

    安装环境:centos7.5 配置离线yum源参考:https://blog.csdn.net/mayh554024289/article/details/54236336vi /etc/yum.co ...

  6. Linux中设置服务自启动的三种方式

    有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务 主要用三种方式进行这一操作: ln -s                       在/etc/rc.d/rc*.d目录中建立/e ...

  7. [转]Linux中设置服务自启动的三种方式

    from:http://www.cnblogs.com/nerxious/archive/2013/01/18/2866548.html 有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统 ...

  8. Linux中设置服务自启动的三种方式,ln -s 建立启动软连接

    有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务(http://www.0830120.com) 主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc*.d目录中建立 ...

  9. (转)Linux中设置服务自启动的三种方式

    有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务 主要用三种方式进行这一操作: ln -s                       在/etc/rc.d/rc*.d目录中建立/e ...

随机推荐

  1. django学习-13.通过pk值手动设置数据表主键

    1.前言 通过django框架的Model层来新增数据库表时,如果在需要新增的表字段里任何一个表字段都没设置主键,框架会默认新增一个表字段id并把该表字段id设置为主键. 那么,如果我们想自己动手设置 ...

  2. Python3网络爬虫-- 使用代理,轮换使用各种IP访问

    # proxy_list 代理列表 run_times = 100000 for i in range(run_times): for item in proxy_list: proxies = { ...

  3. Promise和async await详解

    本文转载自Promise和async await详解 Promise 状态 pending: 初始状态, 非 fulfilled 或 rejected. fulfilled: 成功的操作. rejec ...

  4. 用注解开发SpringMVC

    Spring2.5以后,用注解开发SpringMVC的功能十分强大,注解也是SpringMVC的精髓.在实际开发中,都会使用注解来实现. 这让SpringMVC开发工作量最小化,开发者只要专注于业务逻 ...

  5. Hadoop生态常用数据模型

    Hadoop生态常用数据模型 一.TextFile 二.SequenceFile 1.特性 2.存储结构 3.压缩结构与读取过程 4.读写操作 三.Avro 1.特性 2.数据类型 3.avro-to ...

  6. SpringBoot读取资源目录下的文件

    需要读取resources目录下的文件,那么方法如下: 假设在资源目录下的template目录下有一个文件a.txt,获取到文件流的方式 InputStream stream = this.getCl ...

  7. Go的switch

    目录 go的switch 一.语法 二.默认情况 三.多表达式判断 四.无表达式 五.Fallthrough go的switch switch 是一个条件语句,用于多条件匹配,可以替换多个if els ...

  8. 第29天学习打卡(迭代器、泛型 、Collection工具类、set集合的特点及应用、Map集合的特点及应用)

    迭代器 对过程的重复,称为迭代. 迭代器是遍历Collection集合的通用方式,可以在对集合遍历的同时进行添加.删除等操作. 迭代器的常用方法 next():返回迭代的下一个元素对象 hasNext ...

  9. 分分钟钟学会Python - 第四章 文件操作

    4.1 文件基本操作 obj = open('路径',mode='模式',encoding='编码') obj.write() # 写入 obj.read() # 读取 obj.close() #关闭 ...

  10. react入个门

    起步 react 特点 不使用模板 不是一个mvc框架 响应式 轻量级的js库 原理 虚拟dom 将dom抽象成js对象 diff算法 搭建开发环境 react.js 核心文件 react-dom.j ...