From d8e6ec18ffb722ddfbb6991d981c570bad0948bf Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sun, 4 Aug 2024 10:09:07 -0400 Subject: [PATCH] add SSH instructions to workstation --- infrastructure/graduated/arch/workstation.md | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/infrastructure/graduated/arch/workstation.md b/infrastructure/graduated/arch/workstation.md index 578fd16..de027d8 100644 --- a/infrastructure/graduated/arch/workstation.md +++ b/infrastructure/graduated/arch/workstation.md @@ -1,6 +1,7 @@ # Workstation - [Workstation](#workstation) + - [SSH](#ssh) - [Toolbox](#toolbox) - [Podman](#podman) - [Docker](#docker) @@ -37,6 +38,38 @@ - [Glances](#glances) - [VirtualBox](#virtualbox) +## SSH + +Generate a key with password protection: + +```bash +# Omit "-N 'password'" to have it prompt you +ssh-keygen -f ~/.ssh/test-key -N 'PASSWORD' +``` + +Change the password for an ssh key: + +```bash +# Use "-N ''" to remove the password +ssh-keygen -p -N 'PASSWORD' -f ~/.ssh/test-key +``` + +This is an example config entry in `~/.ssh/config`: + +```conf +Host my-host + Hostname my-host.reeselink.com + User root + ProxyCommand none + ForwardAgent no + ForwardX11 no + Port 22 + KeepAlive yes + IdentityFile ~/.ssh/id_my-host_rsa +``` + +You can ssh to that host with `ssh my-host` after adding a config entry. + ## Toolbox