๐ŸŒ SSH & Networking

โ† Back to Cheatsheets

SSH connection setup, key management, tunnelling, and common network diagnostics. SSH (Secure Shell) is the standard protocol for securely accessing remote machines and authenticating with services like GitHub.

Resources

OpenSSH โ€” Manual ssh_config man page GitHub โ€” SSH Setup Arch Wiki โ€” SSH Keys explainshell.com

SSH Basics

Connect to remote machines securely. The first connection to a new host will ask you to verify its fingerprint โ€” type yes to add it to ~/.ssh/known_hosts.

SSH Config File

~/.ssh/config lets you define aliases and per-host settings so you can type ssh myserver instead of the full command every time.

Port Forwarding & Tunnelling

SSH can forward TCP ports through an encrypted tunnel, useful for reaching services that aren't exposed to the internet or bypassing firewalls.

File Transfer

scp is simple for quick copies; rsync is better for directories and incremental syncs (only transfers changed files).

SSH Keys for Git Services

Generate a key pair once, add the public key to your service, and authenticate automatically without a password.

Network Diagnostics

Tools for checking connectivity, inspecting open ports, and debugging network issues.