ubuntu generate ssh key

how to generate ssh key in linux

ssh-keygen -t rsa -b 4096
ssh-keygen -t dsa
ssh-keygen -t ecdsa -b 521
ssh-keygen -t ed25519

Source: www.ssh.com

ubuntu generate ssh key

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

Source: confluence.atlassian.com

ubuntu add public key to server

ssh-copy-id -i ~/.ssh/id_rsa.pub user@server

Source: codegrepper