Skip to content

ssh-keygen

create new keypair
ssh-keygen -t rsa -b 4096 -C "comment"
ssh-keygen -t ecdsa -b 521 -C "comment"
ssh-keygen -t ed25519 -C "comment" 
generate public-key from private key
ssh-keygen -y -f private-key
add/change passphrase
ssh-keygen -p -f private-key
add/change comment
ssh-keygen -c -C "new comment" -f private-key
copy public key to remote host (~/.ssh/authorized_keys)
ssh-copy-id -i private-key user@host

last updated: Tue Oct 3 20:49:47 2023

Back to top