SSH, Keys, and GPG

SSH General Reference

The most useful SSH-specific commands

GPG Reference

List gpg keys gpg –list-keys gpg –list-secret-keys prints out ids

Disabling Password-based SSH

Settings for hardening ssh on Ubuntu

Remote Unlock your LUKS-encrypted Hard Drive

Updated for Ubuntu 22.04 Install Software sudo apt update sudo apt -y upgrade sudo apt install -y busybox dropbear* Create and add key

Port Forwarding Cheatsheet

ssh -L (localport):localhost:(remoteport) -C -N -l (username) hostname.domain -p (sshport) VNC Example ssh into port 22 on mydynamichost.

Reverse SSH Tunnel

Auto-reconnecting reverse tunnel quickstart

Too Many Authentication Failures?

Received disconnect from ########## port 22:2: Too many authentication failures Add the IdentitiesOnly option to your config file

Unlock a LUKS partition from a file

Why would you want to do this? Sometimes, after encrypting a hard drive, you need it to auto-start.