SecureCRT 密钥认证配置指南
一 准备与生成密钥对
二 在服务器部署公钥
ssh-copy-id user@server_ip,自动创建目录与文件并设置权限。mkdir -p ~/.ssh
chmod 700 ~/.ssh
cat >> ~/.ssh/authorized_keys << 'EOF'
<这里粘贴你的公钥内容>
EOF
chmod 600 ~/.ssh/authorized_keys
ssh-keygen -i -f Identity.pub >> ~/.ssh/authorized_keys
三 在 SecureCRT 中启用密钥认证
四 服务器端 SSH 配置与重启
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys # 或 .ssh/authorized_keys2
PasswordAuthentication no # 禁用密码登录(在确认密钥可用后再关闭)
Protocol 2
systemctl restart sshdservice sshd restart 或 /etc/rc.d/init.d/sshd restart五 常见问题与排查