【问题标题】:Windows ssh default location for idrsa (git install)idrsa 的 Windows ssh 默认位置(git install)
【发布时间】:2016-09-24 19:47:55
【问题描述】:

我在 Windows 7 PC 上安装了 git 我已经安装了 ssh.exe

C:\Program Files (x86)\Git\bin\ssh.exe

它也在我的路上。

以下命令有效并将我连接到我的服务器:

ssh -i%USERPROFILE%/.ssh/id_rsa maven_repo@mvnsnap.metcarob.com -p7345

但是如果我跑了

ssh maven_repo@mvnsnap.metcarob.com -p7345

系统提示我输入密码。我需要这个才能成功运行 Maven 目标。我希望能够指定默认的 idrsa 位置。

有趣的是 ssh-keygen 在我运行它时会输出以下内容:

C:\Program Files (x86)>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa):

似乎未能获得 %USERPROFILE% 位置。任何人都可以提出解决方案吗?

【问题讨论】:

    标签: windows git ssh


    【解决方案1】:

    我发现我必须设置一个名为 HOME 的用户环境变量,然后 ssh 会选择它

    【讨论】:

      猜你喜欢
      • 2013-09-13
      • 2010-09-10
      • 2011-12-02
      • 2017-06-11
      • 2015-11-03
      • 1970-01-01
      • 2014-12-01
      • 2019-06-25
      相关资源
      最近更新 更多