在 Debian 上使用 SecureCRT 配置 密钥登录(SSH 公钥认证),一般分三步:
下面按常见场景说明(SecureCRT 在 Windows / Linux 客户端均可,操作基本一致)。
id_rsa(SecureCRT 默认格式)id_rsa.pubSecureCRT 默认私钥格式是 SSH2 / IETF SECSH
如果 Debian 不识别,可转换格式(见后文)
scp id_rsa.pub user@debian:/tmp/
ssh user@debian
mkdir -p ~/.ssh
chmod 700 ~/.ssh
cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh-copy-id user@debian
Connection → SSH2
id_rsa
确保 SSH 服务允许密钥登录:
sudo nano /etc/ssh/sshd_config
确认:
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
修改后重启:
sudo systemctl restart ssh
转换格式:
ssh-keygen -i -f securecrt_key.pub > openssh_key.pub
或 SecureCRT 导出为 OpenSSH 格式
Debian 严格检查权限:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chmod 600 id_rsa
PasswordAuthentication no
然后重启 SSH
如果你说的是 SecureCRT 跑在 Debian 上 还是 连 Debian 服务器,可以告诉我,我可以按你的具体环境给更精确的配置步骤。