ssh key authentication - ghimele/ghimele GitHub Wiki

Benefits of using ssh key authentication

The key-based authentication is more secure than password authentication. It is also more convenient than password authentication. You can add your public key to the authorized_keys file so that you can log in to your account without entering your password.

Guides to ssh

SSH Key Authentication is a comprehensive guide that describes what is SSH and how to use it.

VSCode remote ssh is a guide how to use SSH in Visual Studio Code

Remote Development Tips and Tricks covers troubleshooting tips and tricks for each of the Visual Studio Code Remote Development extensions.

SSH Key Authentication This video cover how to create the ssh key in different OS

How to create a dedicated ssh key to be used in VS Code

From Windows, run the following command in a local PowerShell:

ssh-keygen -t ed25519 -f "$HOME\.ssh\id_ed25519-remote-ssh"

id_ed25519-remote-ssh is the new private key.

From Windows, run the following command to copy the pub key into your linux ssh host.

$USER_AT_HOST="your-user-name-on-host@hostname"
$PUBKEYPATH="$HOME\.ssh\id_ed25519.pub"

$pubKey=(Get-Content "$PUBKEYPATH" | Out-String); ssh "$USER_AT_HOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '${pubKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"

In VS Code, run Remote-SSH: Open Configuration File... in the Command Palette (F1), select an SSH config file, and add (or modify) a host entry as follows:

Host name-of-ssh-host-here
    User your-user-name-on-host
    HostName host-fqdn-or-ip-goes-here
    IdentityFile ~/.ssh/id_ed25519-remote-ssh

Next time you connect to your connect trough ssh you don't need to enter the password.

Remotely Managing pfsense via SSH Tunneling

This Video explains how to configure pfsense to use the ssh key

⚠️ **GitHub.com Fallback** ⚠️