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.
Comments