持久存储SSH密钥密码 [英] Store SSH key passphrase persistently

查看:146
本文介绍了持久存储SSH密钥密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发环境在Mac上的虚拟机中配置
(使用Debian 8的Vagrant框)。

I已使用 SSH远程访问在VM上安装了Git。
除了在引导我的虚拟机之后,我总是必须为第一个 git push origin master 输入密码,



这是我的远程列表:

  origin git @ github。 com:PiR-P / my_repo.git(fetch)
origin git@github.com:PiR-P / my_repo.git(push)

我试过这个解决方案( https://stackoverflow.com/a/10032655 / 6391764 ),但它只在关闭我的虚拟机之前有效。
$ b

是否有停止/重新启动我的虚拟机之后仍然存在?

ssh-keygen -p 的私钥中删除密码(输入旧密码并按[Enter]键入两个次输入一个空的新密码)。但是您必须了解密码才能保护私钥,因此通过删除密钥,您的密钥会更容易被窃取。


My development environment is configured in a Virtual Machine on my Mac (Vagrant box using Debian 8).

I've installed Git on the VM with SSH remote access. Everything works perfectly fine except that I always have to enter my passphrase for the first git push origin master after having booted my VM.

Here's my list of remotes :

origin  git@github.com:PiR-P/my_repo.git (fetch)
origin  git@github.com:PiR-P/my_repo.git (push)

I've tried this solution (https://stackoverflow.com/a/10032655/6391764) but it only works until I shut down my VM.

Is there anyway to make it persistent even after having stop / reboot my VM?

解决方案

You can remove passphrase from the private key running ssh-keygen -p (enter old passphrase and press [Enter] two times to enter an empty new passphrase). But you have to understand the passphrase protects the private key, so by removing it you make your key more vulnerable to stealing.

这篇关于持久存储SSH密钥密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆