Browsed by
Category: PowerShell

Windows 10 SSH

Windows 10 SSH

Microsoft Windows has come a long way since 95 and I think Windows 10 is the best iteration, with this one going the “as a service” implementation route. To cut to the chase if you are someone who has to use SSH to connect to servers you can now do it natively from inside PowerShell or CMD. (I know, I know, PuTTY is always there to save the day 😛 )

To check if the computer has the version of Windows 10 which already has the SSH client configured, all you have to do is type “ssh” inside PowerShell and if you see the same output as in the image below you are good to go!

In a real world scenario, if you want to connect to a Virtual Machine, say an EC2 Instance in AWS, you will have to meet two conditions:

  1. Make sure that the key you have is in OpenSSH format (puTTYgen to the rescue in case you want to convert a ppk)

2. Make sure that the key file has the appropriate permissions. To do this from the ui you can follow these steps

Right click on the file->Go to Security->Advanced->Disable inheritance-> Select the first option “Convert inherited permissions…”-> Remove all the other accounts that you find in the permissions tab and only leave the account that you use. Make sure that the same account is the owner of the file.

How do I ?

How do I ?

My code editor of choice is Visual Studio Code and so far I found it very useful. It also has a PowerShell extension so I can run my scripts directly from within the Code Editor.

VS Code has a lot of themes from which you can choose but I prefer one theme for the editor and the classic blue and white theme for the terminal.

So if you are like me, you can quickly change the aspect of the terminal by:

  • Open the User Settings (Ctrl + , )
  • Go to Workbench->Appearance->Color Customization and click on “Edit in settings.json
  • Add the code below:
workbench.colorCustomizations": {
    "terminal.foreground": "#FFFFFF",
    "terminal.background": "#012456"
 }