下面是对SSH配置文件的一些选项的分解说明,ssh_config是OpenSSH客户端的配置文件,sshd_config是OpenSSH服务器端的配置文件。
ssh_config的内容如下:
# This is the ssh client system-wide configuration file. See ssh_config(5) for more information. This file provides defaults for users, and the values can be changed in
# er-user configuration files or on the command line.
# Configuration data is parsed as follows: // 配置选项生效的优先级
# 1. command line options // 命令行选项
# 2. user-specific file // 用户指定文件
# 3. system-wide file // 系统范围的文件
# Any configuration value is only changed the first time it is set. Thus, host-specific definitions should be at the beginning of the configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive list of available options, their meanings and defaults, please see the ssh_config(5) man page.
Host * // 使用的计算机范围,'*'表示全部
# ForwardAgent no // 设置连接是否经过验证代理(如果存在)转发给远程计算机
# ForwardX11 no // 设置X11连接是否被自动重定向到安全的通道和显示集
# ForwardX11Trusted yes // 是否允许转发X11会话
# RhostsRSAAuthentication no // 设置是否使用RSA进行rhosts的安全验证
# RSAAuthentication yes // 设置是否使用RSA进行安全验证
# PasswordAuthentication yes // 设置是否需要口令验证
# HostbasedAuthentication