当前位置:网站首页>Ssh server configuration file sshd_ Config and operation
Ssh server configuration file sshd_ Config and operation
2022-06-27 12:28:00 【I was naughty when I was a child】
Server's sshd Configuration file for :/etc/sshd/sshd_config
Just introduce the key things
# The note needs to be deleted to reconfigure #( For example, change the port port 2222)
#Port 22 Default port number , Multiple port numbers can be used
#Port 443
#AddressFamily any # Agreement family , IPV4 or IPV6
#ListenAddress 0.0.0.0 # Monitor address
#ListenAddress :: # To specify IPV6 All address formats
# The current version supports key authentication methods
HostKey /etc/ssh/ssh_host_rsa_key #rsa Private key authentication
HostKey /etc/ssh/ssh_host_ecdsa_key #ecdsa Private key authentication
HostKey /etc/ssh/ssh_host_ed25519_key #ed25519 Private key authentication
# Logging # Information about log file data placement and daemon The name of
#SyslogFacility AUTH # Someone used SSH When logging into the system ,SSH Will record information , Recorded in the /var/log/secure
SyslogFacility AUTHPRIV # The default is AUTH To set up .
#LogLevel INFO # The log level
# Authentication: # authentication
#LoginGraceTime 2m # The password input screen appears , How long have you not been successfully connected SSH Server It's broken .
PermitRootLogin yes # Whether to allow administrators to log in remotely
#StrictModes yes # sshd Check the permission data of the user's home directory or related files , When the user's host key After change ,Server Online... Is not accepted
#MaxAuthTries 6 # Maximum number of attempts
#MaxSessions 10 # Maximum number of sessions allowed
#PubkeyAuthentication yes # Whether to allow Public Key
# 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 # When selecting key based authentication , After the client generates a pair of public and private keys , Put the public key in .ssh/authorized_keys,
#AuthorizedPrincipalsFile none # Send welcome message file ,none Means not to send
#AuthorizedKeysCommand none # Specify the script to find the user's public key file for authentication , Call... At the login authentication level , The acceptable parameters are the private key used when the user attempts to log in
#AuthorizedKeysCommandUser nobody # Specify the users to find
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no # Trust ~/.ssh/known_hosts file
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no # Ignore user known_hosts file
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes # Cancel use ~/.ssh/.rhosts As a certification .
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes # Whether password verification is required
#PermitEmptyPasswords no # Whether null password is allowed
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no # Is it permissible to question - The reply (challenge-response) authentication .
# The default value is "yes", all login.conf All authentication methods allowed in are supported .
# Kerberos options #Kerberos Authentication server options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes
# GSSAPI options # Common security services API options
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no
# PAM: Pluggable Authentication Modules Pluggable authentication module
UsePAM yes # Use PAM Module Certification
#AllowAgentForwarding yes # Allow forwarding through proxy
#AllowTcpForwarding yes # Allow to pass through TCP forward
#GatewayPorts no # Forwarding path port
X11Forwarding yes #X-window Set up
#X11DisplayOffset 10 #x-window Set up
#X11UseLocalhost yes #x-window Set up
#PermitTTY yes # allow tty
# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd,
# as it is more configurable and versatile than the built-in version.
PrintMotd no # Whether to display information after login , Even if you read /etc/motd The contents of the document
#PrintLastLog yes # Display last login information
#TCPKeepAlive yes #SSH Server It will transmit KeepAlive Information to the Client, Make sure you are online
#PermitUserEnvironment no # If one party goes offline ,SSh You can know immediately
#Compression delayed # Compression delay
#ClientAliveInterval 0 # Set the maximum duration of idle login
#ClientAliveCountMax 3 # When no data is received , Maximum direction 3 One client for keepalive testing
#ShowPatchLevel no # Display patch level
#UseDNS no # Turn on DNS analysis
#PidFile /var/run/sshd.pid # Storage ssh Of pid file
#MaxStartups 10:30:100 # The maximum number of unauthenticated connections can be maintained
#PermitTunnel no # allow tun Device forwarding
#ChrootDirectory none # Whether to allow switching directories
#VersionAddendum none # Configure additional versions
# no default banner path
#Banner none # Do not set welcome words
# Accept locale-related environment variables Accept local dependent environment variable types
# Open or not sftp service
# 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 # Open or not X11 forward
# AllowTcpForwarding no # Whether to allow TCP forward
# PermitTTY no # Whether to allow tty
# ForceCommand cvs server # Limit command
边栏推荐
- Neo4j:入门基础(一)之安装与使用
- Tidb 6.0: making Tso more efficient tidb Book rush
- Secyun won the "2022 AI analysis · it operation and maintenance vendor panorama report" as the representative vendor of intelligent operation and maintenance aiops Market
- uni-app 使用escook/request-miniprogram插件发请求说明
- MySQL高阶语句(一)
- 【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(二)
- Use of message queues
- Master formula
- Private dry goods sharing: how to implement platform in Enterprise Architecture
- application. Configuration information of properties
猜你喜欢
如何修改 node_modules 里的文件
AI for Science:科研范式、开源平台和产业形态
How to find the movie and TV clips with the same lines? These 8 movies search for artifact, and find the corresponding segment in one line
pull request
Nifi from introduction to practice (nanny level tutorial) - identity authentication
号称史上最难618,淘宝数据盘点你做对了吗?
Histrix工作原理
Interviewer: with the for loop, why do you need foreach?
ACL 2022 | 中科院提出TAMT:TAMT:通过下游任务无关掩码训练搜索可迁移的BERT子网络
面试突击60:什么情况会导致 MySQL 索引失效?
随机推荐
Topic38——56. 合并区间
mybaitis生成器详解
Object serialization
Master formula
Topic37——64. Minimum path sum
Microservice splitting
MySQL high level statements (I)
面试突击60:什么情况会导致 MySQL 索引失效?
Jianmu continuous integration platform v2.5.0 release
Mit6.031 software construction7 reading notesdesigning specifications
Research Report on the overall scale, major manufacturers, major regions, products and application segments of hydraulic torque in the global market in 2022
Two usages of enumeration classes
DM8:达梦数据库-锁超时
build.gradle 配置
对象序列化
MapReduce practical cases (customized sorting, secondary sorting, grouping, zoning)
秒云荣获《2022爱分析 · IT运维厂商全景报告》智能运维AIOps市场代表厂商
亚马逊测评掉评、留不上评是怎么回事呢?要如何应对?
深入理解 happens-before 原则
How to find the movie and TV clips with the same lines? These 8 movies search for artifact, and find the corresponding segment in one line