/etc/ssh:全局文件
以下是/etc/ssh目录下全局配置文件的简要说明。
# ls -lrt /etc/ssh total 156 -rw------- 1 root root 125811 Aug 7 13:40 moduli -rw-r--r--. 1 root root 382 Aug 9 00:39 ssh_host_rsa_key.pub -rw-------. 1 root root 1675 Aug 9 00:39 ssh_host_rsa_key -rw-r--r--. 1 root root 627 Aug 9 00:39 ssh_host_key.pub -rw-------. 1 root root 963 Aug 9 00:39 ssh_host_key -rw-r--r--. 1 root root 590 Aug 9 00:39 ssh_host_dsa_key.pub -rw-------. 1 root root 668 Aug 9 00:39 ssh_host_dsa_key -rw-r--r--. 1 root root 2103 Aug 9 00:40 ssh_config -rw-------. 1 root root 3949 Aug 9 00:40 sshd_config
文件 | 作用 |
---|---|
moduli | 包含用于建立安全连接的密钥交换信息 |
ssh_config | 默认的 OpenSSH 客户端配置文件。条目被用户's ~/.ssh/config 文件覆盖。 |
sshd_config | sshd 守护进程的配置文件 |
ssh_host_ecdsa_key | sshd 守护进程使用的 ECDSA 私钥 |
ssh_host_ecdsa_key.pub | sshd 守护进程使用的 ECDSA 公钥 |
ssh_host_key | 版本 SSH1 的 RSA 私钥 |
ssh_host_key.pub | 版本 SSH1 的 RSA 公钥 |
ssh_host_rsa_key | SSH2 版本的 RSA 私钥 |
ssh_host_rsa_key.pub | SSH2 版本的 RSA 公钥 |
还有一个用于 sshd 守护进程的 PAM 配置文件 /etc/pam.d/sshd 和一个用于 sshd 服务的配置文件 /etc/sysconfig/sshd 。
OpenSSH 客户端和服务器有几个配置文件。
全局配置文件存储在 /etc/ssh 目录中。
用户配置文件存储在用户主目录 (~/.ssh) 的 .ssh 目录中。
on
it
road
.com
~/.ssh: 用户文件
当我们连接到远程系统时,OpenSSH 会自动创建 ~/.ssh 目录和 known_hosts 文件。
以下是用户特定配置文件的简要说明:
文件 | 作用 |
---|---|
authorized_keys | 包含 SSH 服务器的授权公钥列表。服务器通过检查此文件中的签名公钥来验证客户端。 |
id_ecdsa | 用户的ECDSA私钥 |
id_ecdsa.pub | 用户的ECDSA公钥 |
id_rsa | SSH2 版本的 RSA 私钥 |
id_rsa.pub | SSH2 版本的 RSA 公钥 |
identity | 版本 SSH1 的 RSA 私钥 |
identity.pub | 版本 SSH1 的 RSA 公钥 |
known_hosts | 包含用户访问的 SSH 服务器的主机密钥。每次用户连接到新服务器时,OpenSSH 都会自动添加条目。 |
日期:2020-09-17 00:14:33 来源:oir作者:oir