Pageant wildcard workaround: Unterschied zwischen den Versionen
Niki (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Using a key agent for SSH simplifies work. With PuTTY, you use pageant.exe. But there is a problem: You need to load all keyfiles manually. And if all keys are se...“) |
Niki (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
+ | <section begin="head"/> | ||
Using a key agent for SSH simplifies work. With PuTTY, you use pageant.exe. But there is a problem: You need to load all keyfiles manually. And if all keys are secured with a password you have to type the passwords a few times. However, pageant has one feature: You can pass keyfiles as parameters. If all keys are secured with the same passphrase you have to enter it only once. If you have multiple keyfiles you would like to use: | Using a key agent for SSH simplifies work. With PuTTY, you use pageant.exe. But there is a problem: You need to load all keyfiles manually. And if all keys are secured with a password you have to type the passwords a few times. However, pageant has one feature: You can pass keyfiles as parameters. If all keys are secured with the same passphrase you have to enter it only once. If you have multiple keyfiles you would like to use: | ||
pageant.exe *.ppk | pageant.exe *.ppk | ||
− | But unfortunately this does not work. | + | But unfortunately this does not work. This issue is already included in the wishlist (http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/pageant-wildcard.html) but seems to be not yet implementet. In this article I show a small workaround |
+ | <section end="head"/> | ||
+ | |||
+ | = Workaround = | ||
+ | |||
+ | I use the following cmd-file to enumerate all *.ppk files. The result is written to a variable and finally the pageant is called: | ||
+ | |||
+ | <source lang="winbatch"> | ||
+ | @echo off | ||
+ | |||
+ | SETLOCAL enabledelayedexpansion | ||
+ | |||
+ | FOR /f %%f IN ('DIR /B *.ppk') DO SET keylist=!keylist! %%f | ||
+ | |||
+ | start pageant.exe !keylist! | ||
+ | </source> |
Version vom 26. Juli 2009, 23:54 Uhr
Using a key agent for SSH simplifies work. With PuTTY, you use pageant.exe. But there is a problem: You need to load all keyfiles manually. And if all keys are secured with a password you have to type the passwords a few times. However, pageant has one feature: You can pass keyfiles as parameters. If all keys are secured with the same passphrase you have to enter it only once. If you have multiple keyfiles you would like to use:
pageant.exe *.ppk
But unfortunately this does not work. This issue is already included in the wishlist (http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/pageant-wildcard.html) but seems to be not yet implementet. In this article I show a small workaround
Workaround
I use the following cmd-file to enumerate all *.ppk files. The result is written to a variable and finally the pageant is called:
@echo off
SETLOCAL enabledelayedexpansion
FOR /f %%f IN ('DIR /B *.ppk') DO SET keylist=!keylist! %%f
start pageant.exe !keylist!