check ssh key in ubuntu code example
Example 1: checking for existing ssh keys
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
Example 2: ubuntu generate ssh key
ssh-keygen -t rsa -C "[email protected]"
Example 3: ubuntu add public key to server
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server