Skip to content

Latest commit

 

History

History
 
 

basics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

SSH Basics

Generate an SSH key pair

ssh-keygen -t ed25519 -C "your_email@example.com"

This creates two files by default:

  • ~/.ssh/id_ed25519 (private key — never share this)
  • ~/.ssh/id_ed25519.pub (public key — safe to share)

Copy your public key to a remote server

ssh-copy-id user@remote-host

This appends your public key to ~/.ssh/authorized_keys on the remote host, enabling passwordless login.

Connect to a remote server

ssh user@remote-host

Connect using a specific key and port

ssh -i ~/.ssh/id_ed25519 -p 2222 user@remote-host

View known hosts

Every server you connect to gets fingerprinted in:

cat ~/.ssh/known_hosts

Copy files with SCP

scp localfile.txt user@remote-host:/home/user/