SSH Cheatsheet

SSH commands, key-based authentication, and secure remote connections

Remote Access6 commandsbeginner

Overview

SSH provides secure encrypted communication between remote systems.

Why It Matters

SSH is the standard for secure remote access and server administration.

Essential Commands

ssh user@server

Connect to remote server over SSH

ssh -i ~/.ssh/id_ed25519 user@server

Connect using specific key file

ssh-copy-id user@server

Install public key on remote host

scp file.txt user@server:/tmp/

Copy local file to remote host

ssh -L 5432:localhost:5432 user@server

Create local port-forward tunnel

ssh -J bastion user@internal-host

Connect through jump host

Quick Start

Begin by learning generate and configure ssh keys

Key Concepts

Generate and configure SSH keys

Create SSH config for managing multiple hosts

Use SSH tunneling for port forwarding

Pro Tips

  • Combine multiple commands for powerful workflows
  • Use aliases to speed up your command entry
  • Create scripts to automate repetitive tasks

Common Pitfalls to Avoid

  • Forgetting to check the documentation for edge cases
  • Running commands without understanding their full impact
  • Not testing changes in a safe environment first

Related Resources

6 items

Quick Reference