
正文
[svc][op]SSH公钥认证+优化
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
一 ssh公钥认证流程:sshclinet机器:产生公私钥(公钥相当于一把锁)sshclient:将公钥发给sshserver(抛出锁子)sshclinet去连sshserver不需要密钥
二 ssh优化cat /etc/ssh/sshd_config 追加一下Port 22#ssh连接默认的端口PermitRootLogin yes #root用户黑客都知道,禁止它远程登录PermitEmptyPasswords no #禁止空密码登录UseDNS no #不使用DNSGSSAPIAuthentication no
三 ssh连接慢解决cat /etc/ssh/sshd_configUseDNS no #不使用DNSGSSAPIAuthentication no hosts文件里添加主机名解析
sshclinet机器:产生公私钥(公钥相当于一把锁)sshclient:将公钥发给sshserver(抛出锁子)sshclinet去连sshserver不需要密钥
cat /etc/ssh/sshd_config 追加一下Port 22#ssh连接默认的端口PermitRootLogin yes #root用户黑客都知道,禁止它远程登录PermitEmptyPasswords no #禁止空密码登录UseDNS no #不使用DNSGSSAPIAuthentication no
三 ssh连接慢解决cat /etc/ssh/sshd_configUseDNS no #不使用DNSGSSAPIAuthentication no hosts文件里添加主机名解析
cat /etc/ssh/sshd_configUseDNS no #不使用DNSGSSAPIAuthentication no hosts文件里添加主机名解析







