PowerShell – Add private key for Key Authentication SSH

We can use PowerShell as a SSH client. If your SSH server requires key authentication, you can use the following command to add your private key before you could establish the SSH connection.

  • ssh-add [key path]

 

If you private key is password protected, PowerShell will prompt for your password.
powershell-add-key-for-ssh-1
 

After you have added the key, you can now SSH to your server just like what you did in Linux.

  • ssh [user]@[hostname]

 

Done =)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.