title: How to list loaded SSH keys in Windows (pageant)
body: <p>I'm trying to create simple Windows batch script that will manage connectivity to our client. That includes some tunnels using <code>plink.exe</code> and socks chain. Each hop requires ssh key authentication for which I'm using <code>pageant.exe</code>.</p>
  
  <p>I have each piece scripted out as needed, except the pageant part, where I struggle. Facts encountered:</p>
  
  <p>If I only start <code>pageant.exe</code> it will start pageant agent without any SSH key loaded and script will continue right away. Then I can run <code>pageant.exe my_key.ppk</code> to add the key into pageant and passphrase will be prompted, however script will continue meanwhile as well, so script will continue to plink part which will fail, because user will not provide passphrase till that time.</p>
  
  <p>I've been looking into pageant docs and found some CLI switches like <code>-l</code> that supposedly should list loaded keys, that however does not seems to work on Windows version. Seems like windows version is only accepting arguments in form of .ppk files</p>
  
  <p>I'd like to basically make some kind of "wait" function until user will provide passphrase. Is there any way how to either list loaded keys directly from pageant or any generic method asking Windows environment for SSH keys?</p>