Wednesday, April 07, 2021

Logging in to remote ssh server using private/public key pair

Logging in to remote ssh server using private/public key pair

I have recently used VS Code for remote development and I am experiencing multiple disconnections a day. Like disconnecting form the docking station, moving around the house or just plain network issues. Using password to reconnect is becoming an annoyance. To help improve the workflow I have enabled private/public key pair, like:

PS C:\> ssh-keygen -t rsa -b 2048
PS C:\> cat ~/.ssh/id_rsa.pub | ssh user@remote_ip "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

This was tested on Windows 10 v1909.

No comments:

Install Winget on Windows 2022 or Windows 10 LSTC

Install Winget on Windows 2022 or Windows 10 LTSC Install Pre-reqs Install Microsoft.UI.Xaml/2.8.6 Navigate to https://www.nuget.org/pa...