Generate SSH key Ubuntu code example

Example 1: generate ssh key paitr

$ ssh-keygen -t rsa -b 4096 -C "[email protected]"

Example 2: ubuntu generate ssh key

ssh-keygen -t rsa -C "[email protected]"

Example 3: how to generate ssh key in ubuntu

ssh-keygen -t rsa 4056

Example 4: ubuntu create a ssh key

cat ~/.ssh/id_rsa.pub | ssh username@remote_host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"

Example 5: ubuntu add public key to server

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

Example 6: generate ssh in ubuntu

ssh-keygen -t rsa -b 4096 -C "[email protected]"Copy

Tags:

Misc Example