启动 Pageant SSH-Agent 并加载文件夹中的所有密钥 [英] Start Pageant SSH-Agent and load all keys in a folder

查看:100
本文介绍了启动 Pageant SSH-Agent 并加载文件夹中的所有密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何启动选美 ssh 代理并加载我的所有私钥,而无需将它们一一添加到批处理文件或选美本身中?

How can i start the pageant ssh agent, and load all my private keys without adding them one by one to a batch file or in pageant itself?

我可以在命令行上通过在可执行文件之后列出密钥文件来将密钥文件添加到选美中,或者在选美已经运行时手动加载它们.但是没有详细记录的方法可以在启动时加载文件夹中的所有密钥文件.

I can add key-files to pageant on the commandline by listing them after the executable or load them manually when pageant is already running. But there is no well documented way to load all the key-files in a folder on startup.

推荐答案

我假设你已经安装了 putty 和 pageant 并且在你的 PATH 中可用

i assume you have putty and thus pageant installed and available in your PATH

  1. 在 Windows 自动启动菜单中添加快捷方式:C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
  2. 编辑快捷方式并输入 powershell -Command "& pageant (Get-ChildItem [PATH TO KEYS]\*.ppk)"(将 [PATH TO KEYS] 放在您的密钥路径-文件;)
  3. (可选)将快捷方式的图像更新为更合适的图像
  4. 点击确定.
  1. add a shortcut in you windows autostart menu: C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
  2. edit the shortcut and enter powershell -Command "& pageant (Get-ChildItem [PATH TO KEYS]\*.ppk)" (preplace [PATH TO KEYS] with the path to your key-files ;)
  3. (optional) update the image of the shortcut to anything more appropriate
  4. click ok.

在下一次重新启动时,应该使用链接文件夹中的所有 ppk 文件启动选美比赛.

On the next reboot pageant should be started up with all the ppk files in the linked folder.

如果您想避免控制台窗口弹出,请从 https:/获取 RunHiddenConsole/github.com/SeidChr/RunHiddenConsole.

If you want to avoid the console window popup, get RunHiddenConsole from https://github.com/SeidChr/RunHiddenConsole.

  1. 将 hiddenw.exe 重命名为 powershellw.exe 或 pwshw.exe(无论您使用什么外壳),并将文件放入路径中列出的文件夹中
  2. 更新powershellw -Command "& pageant (Get-ChildItem [PATH TO KEYS]\*.ppk)"的快捷方式
  3. 点击确定

这篇关于启动 Pageant SSH-Agent 并加载文件夹中的所有密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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