[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 #不使用DNS

GSSAPIAuthentication no

三 ssh连接慢解决

cat /etc/ssh/sshd_config

UseDNS no #不使用DNS

GSSAPIAuthentication no



 hosts文件里添加主机名解析

  

原文地址:https://www.cnblogs.com/iiiiher/p/5467107.html