Scheda di Riferimento SSH
Un riferimento ricercabile e stampabile di SSH — connessione, chiavi, configurazione, tunneling, SCP/SFTP e agent forwarding. Gratis.
Connecting
10ssh user@host
ssh -p 2222 user@host
ssh -i ~/.ssh/id_ed25519 user@host
ssh user@host 'uptime'
ssh -v user@host
ssh -t user@host 'sudo -i'
ssh -X user@host
ssh -o ServerAliveInterval=60 user@host
exit / Ctrl-D
~.
Key generation
8ssh-keygen -t ed25519 -C 'you@example.com'
ssh-keygen -t rsa -b 4096
ssh-keygen -t ed25519 -f ~/.ssh/work
ssh-keygen -p -f ~/.ssh/id_ed25519
ssh-keygen -y -f ~/.ssh/id_ed25519
ssh-keygen -l -f ~/.ssh/id_ed25519.pub
ssh-keygen -lv -f ~/.ssh/id_ed25519.pub
ssh-keygen -R host
Installing public keys
7ssh-copy-id user@host
ssh-copy-id -i ~/.ssh/work.pub user@host
ssh-copy-id -p 2222 user@host
cat ~/.ssh/id_ed25519.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
pbcopy < ~/.ssh/id_ed25519.pub
SSH config (~/.ssh/config)
10Host myserver
HostName 203.0.113.10
User deploy
Port 2222
IdentityFile ~/.ssh/work
IdentitiesOnly yes
ForwardAgent yes
Host *.example.com
Host *
ServerAliveInterval 60
Port forwarding / tunneling
7ssh -L 8080:localhost:80 user@host
ssh -L 5432:db.internal:5432 user@host
ssh -R 9000:localhost:3000 user@host
ssh -D 1080 user@host
ssh -N -L 8080:localhost:80 user@host
ssh -f -N -L 8080:localhost:80 user@host
ssh -g -L 8080:localhost:80 user@host
Jump hosts / bastions
5ssh -J jump@bastion user@target
ssh -J h1,h2 user@target
ProxyJump bastion
ProxyCommand ssh -W %h:%p bastion
ssh -o ProxyJump=bastion user@target
File transfer (scp & sftp)
7scp file user@host:/path/
scp user@host:/path/file .
scp -r dir/ user@host:/path/
scp -P 2222 file user@host:/path/
sftp user@host
put localfile / get remotefile
rsync -avz -e ssh dir/ user@host:/path/
ssh-agent & forwarding
7eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
ssh-add -l
ssh-add -D
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
ssh -A user@host
ForwardAgent yes
Nessuna voce corrisponde a “:q”.
Informazioni su Scheda di Riferimento SSH
Questa cheat sheet SSH raccoglie i comandi e le configurazioni necessari per lavorare con server remoti: connessione, generazione delle chiavi, installazione delle chiavi pubbliche, il file ~/.ssh/config, port forwarding e tunneling, jump host e bastion, trasferimento file con scp e sftp, e ssh-agent con agent forwarding.
La sintassi SSH è facile da ricordare a metà — è -L o -R per quel tunnel, quali flag di ssh-keygen producono una chiave moderna, come funziona ProxyJump? Ogni riga qui risponde a una di queste domande con il comando esatto e una spiegazione di una riga.
La scheda è gratuita e resa interamente nel tuo browser. Filtrala in tempo reale con la ricerca, salta a una sezione dal sommario fisso, copia qualsiasi comando con un clic e stampala per i momenti in cui è proprio SSH a essere rotto.
Come usare Scheda di Riferimento SSH
- Apri la scheda e scorri le sezioni, da Connessione e Generazione delle chiavi fino a ssh-agent e forwarding.
- Cerca un termine come tunnel, scp o ProxyJump per filtrare i comandi in tempo reale.
- Passa a Port forwarding / tunneling o Configurazione SSH tramite la barra laterale fissa quando ti serve una ricetta specifica.
- Clicca su un comando o sulla sua icona di copia per copiarlo, poi adatta i segnaposto di host e porta.
- Stampa la scheda per conservare una copia offline per le emergenze sui server.