通过vs进行远程连接开发时,遇到一个ssh私钥连接不成功的问题。我的私钥时通过ssh-keygen命令生成的默认密钥。该密钥格式为默认的openssh。
但是根据微软的官方文档,vs2019目前仅支持RSA和DSA密钥用于远程连接
因此遇到此问题,可在生成私钥时选择rsa

#生成
ssh-keygen -t rsa
#转换
#https://stackoverflow.com/questions/54994641/openssh-private-key-to-rsa-private-key
ssh-keygen -p -P "old passphrase" -N "new passphrase" -m pem -f path/to/key

或者使用Puttygen工具进行转换,首先通过Conversions-Import Key加载私钥,再通过Export OpenSSH Key导出RSA格式的私钥。

相关文章:

  • 2022-02-12
  • 2021-08-30
  • 2021-04-23
  • 2021-06-12
  • 2021-11-06
  • 2022-01-14
  • 2021-06-09
猜你喜欢
  • 2021-11-11
  • 2021-07-28
  • 2022-03-05
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案