ubuntu find my ssh key code example
Example 1: ubuntu generate ssh key
ssh-keygen -t rsa -C "[email protected]"
Example 2: see ssh key
# see SSH key List
~/.ssh
# see public key from existing file
cat ~/ssh/<filename>.pub
Example 3: 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"