OpenSSH 给出“无法打开文件”错误,因为它正在寻找不存在的 -cert 文件

OpenSSH 给出“无法打开文件”错误,因为它正在寻找不存在的 -cert 文件

我正在尝试从我的 Windows 机器登录到 ssh 服务器。当我输入以下命令时(其中rsa_key_file是使用 生成的私钥ssh-keygen):

ssh -i ~/.ssh/rsa_key_file [email protected] -vvv

我收到一条错误消息,指出 ssh 无法打开不存在的文件rsa_key_file-cert

debug1: Reading configuration data C:\\Users\\usr/.ssh/config
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolving "domain.edu" port 22
debug2: ssh_connect_direct
debug1: Connecting to domain.edu [128.91.223.80] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\usr/.ssh/rsa_key_file type 0
debug3: Failed to open file:C:/Users/usr/.ssh/rsa_key_file-cert error:2
debug3: Failed to open file:C:/Users/usr/.ssh/rsa_key_file-cert.pub error:2
debug1: identity file C:\\Users\\usr/.ssh/rsa_key_file-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug3: recv - from CB(2) ERROR:108, io:000002C78C7FE8F0
kex_exchange_identification: read: Connection reset

我的理解是,ssh 默认不要求拥有用于验证密钥的证书,所以我不知道它为什么要搜索证书文件。我的问题是:如果我不想使用带有 CA 生成的证书的 ssh 作为公钥,我该怎么做?我以前用过 ssh,但从来没有这样做过,设置配置也会IdentitiesOnly yes导致同样的问题。

相关内容