title: Establish SSH-connection via VBA and OpenSSH / Windows Shell
body: <p>I try to establish a SSH-connection via VBA and the Windows-Shell-command.</p>
  <p>If I manually open the Windows-command line (cmd.exe) and put</p>
  <pre><code>ssh -i 'C:\Temp\MySecureKey_SSH.pem' ec2-user@X.XX.XXX.XXX
  </code></pre>
  <p>the connection will be established as wished. But every try to pass this command from VBA lost. Even it was not possible to open the command line via VBA and change there to the OpenSSH directory. The named directory will not be shown on a command line created via VBA:</p>
  <pre><code>strCMD = &quot;cmd.exe /S /K &quot; &amp; Chr(34) &amp; &quot;C:\Windows\System32\OpenSSH\ssh.exe&quot; &amp; Chr(34)
  PID = Shell(strCMD, vbMaximizedFocus)
  </code></pre>
  <p>To give you a better understanding for what I need this: the final aim is to pass commands via SSH to a easyrsa3 instance (<a href="https://github.com/OpenVPN/easy-rsa/" rel="nofollow noreferrer">https://github.com/OpenVPN/easy-rsa/</a>). As creating a new client certificate is very uncomfortable (different steps to go) it would be great to simplify that via VBA (create new client certificate, copy certificate to a certain directory, copy certificate via scp to the local PC, generate an OpenVPN-config-file with the certificates).</p>