For years, I have stuck to using Putty for my SSH needs on Windows 10. It works well but I was looking into alternative SSH clients which is when I found that Windows 10 ships with an OpenSSH Client/Server package. So if you want to try an alternative, this can work as a solid tool. Do note that Putty has much more features than this so if your needs are restricted to using SSH, this should be sufficient.
If you have all the recent Windows 10 Updates, then OpenSSH client is already available for you. But do check before proceeding with the tutorial. To do that, open Windows Settings > Apps & Features > Optional Features. Scroll the list of installed features to see if you have OpenSSH Client installed. Here’s how it shows on my Windows.
If you don’t see it in the list, then proceed to Add a Feature and Install it from there. You can also install it via Powershell. Launch Powershell in Administrator mode and enter the following command to install the SSH Client.
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
If your server uses Password only Authentication, you can proceed straight away to connect to it.
ssh firstname.lastname@example.org # UPN syntax works... ssh email@example.com@1ni1635305628amod1635305628 # ...as does NetBIOS syntax ssh user1\moc.e1635305628lpmax1635305628e@1ni1635305628amod1635305628
Key Based Authentication
We need few more steps for key based authentication. For the purpose of the tutorial, you should have your server’s Private and Public keys available with you on the System.
We will use ssh-agent service to store the private keys. This will store the keys and automatically supply them when you use the ssh command to connect.
Copy both the public and private keys of the server to C:/Users/<Username>/.ssh directory. Installation of the OpenSSH Client automatically creates the .ssh directory. If its not there for some reason, create it manually.
Use the following the command to add the private key.
~ refers to the Current User directory in Windows just like it does in Linux.
Now you can simply use
command and your key is used automatically.