ui_pageant » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2022-04-07 | 2022-06-09 | ||
updating paths + typography + winscp (martin) | 5.20.4 putty tools 0.77: Pageant: Option --openssh-config to allow easy interoperation with Windows’s ssh.exe (martin) | ||
Line 94: | Line 94: | ||
"C:\Program Files (x86)\WinSCP\PuTTY\pageant.exe" d:\main.ppk -c "C:\Program Files (x86)\WinSCP\WinSCP.exe" | "C:\Program Files (x86)\WinSCP\PuTTY\pageant.exe" d:\main.ppk -c "C:\Program Files (x86)\WinSCP\WinSCP.exe" | ||
</code> | </code> | ||
+ | |||
+ | ==== Integrating with Windows OpenSSH ==== | ||
+ | |||
+ | Windows's own port of OpenSSH uses the same mechanism as Pageant to talk to its SSH agent (Windows named pipes). This means that Windows OpenSSH can talk directly to Pageant, if it knows where to find Pageant's named pipe. | ||
+ | |||
+ | When Pageant starts up, it can optionally write out a file containing an OpenSSH configuration directive that tells the Windows ''ssh.exe'' where to find Pageant. If you include this file from your Windows SSH configuration, then ''ssh.exe'' should automatically use Pageant as its agent, so that you can keep your keys in one place and have both SSH clients able to use them. | ||
+ | |||
+ | The option is ''%%--openssh-config%%'', and you follow it with a filename. | ||
+ | |||
+ | To refer to this file from your main OpenSSH configuration, you can use the ''Include'' directive. For example, you might run Pageant like this (with your own username substituted, of course): &winpath | ||
+ | <code> | ||
+ | pageant --openssh-config C:\Users\martin\.ssh\pageant.conf | ||
+ | </code> | ||
+ | |||
+ | and then add a directive like this to your main ''.ssh\config'' file (assuming that lives in the same directory that you just put | ||
+ | ''pageant.conf''): | ||
+ | <code> | ||
+ | Include pageant.conf | ||
+ | </code> | ||
+ | Note: this technique only works with Windows's port of OpenSSH, which lives at ''%SYSTEMROOT%\System32\OpenSSH\ssh.exe'' if you have it installed. (If not, it can be installed as a Windows optional feature, e.g., via //Settings > Apps & features > Optional features > Add a feature > OpenSSH Client//.) &wincp &winpath | ||
+ | |||
+ | There are other versions of OpenSSH for Windows, notably the one that comes with Windows Git. Those will likely not work with the same configuration, because they tend to depend on Unix emulation layers like MinGW or MSys, so they won't speak Windows native pathname syntax or understand named pipes. The above instructions will only work with Windows's own version of OpenSSH. | ||
+ | |||
+ | So, if you want to use Windows Git with an SSH key held in Pageant, you'll have to set the environment variable ''GIT_SSH'', to point at a different program. You could point it at ''C:\Windows\System32\OpenSSH\ssh.exe'' once you've done this setup – but it's just as easy to point it at Plink! | ||
==== Starting with the Key List Visible ==== | ==== Starting with the Key List Visible ==== |