简体   繁体   English

如何使用Git ssh-agent保存密码

[英]How to save password with Git ssh-agent

Not sure how or why, but ssh-agent lost all saved passwords. 不知道如何或为什么,但是ssh-agent丢失了所有保存的密码。 How can I re-add them? 如何重新添加它们?

I would like it if when connecting over SSH to type the password then and have ssh-agent remember it from there on. 如果通过SSH连接以键入密码,然后让ssh-agent从那里记住它,我会希望它。

I use a config file for different hosts and as far as I remember I didn't have to ssh-add for any of the entries there but rather type the password once and then the agent remembered it. 我为不同的主机使用了一个配置文件,据我所记得,我不必在其中ssh-add任何条目,而ssh-add键入一次密码,然后代理便便记住了该密码。

Thank you. 谢谢。

If you are using a shell which didn't get created by the same shell as the one which spawned ssh-agent, then you need to set some env variables so ssh knows which agent to query. 如果您使用的外壳与生成ssh-agent的外壳不是由同一外壳创建的,则需要设置一些env变量,以便ssh知道要查询的代理。

They are displayed when you run ssh-agent for easy import into a new shell. 当您运行ssh-agent以便轻松导入到新的shell中时,将显示它们。

See http://mah.everybody.org/docs/ssh for more details. 有关更多详细信息,请参见http://mah.everybody.org/docs/ssh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM