Secure shell: Connect Remote server using SSH protocol
-check existing key :ls -al ~/.ssh // It shows existing public and private key pair
Generating a new SSH key and adding it to the ssh-agent
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
ssh-add -K ~/.ssh/id_rsa
$ eval "$(ssh-agent -s)"
ssh-add -K /Users/you/.ssh/id_rsa
-Copy the public key at remote server location ( eg.bitbucket server).
-Private key is fully encrypted.
https://sbme-tutorials.github.io/2019/data-structures/notes/public_key.html
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Adding DNS entry to be able to connect through host name
ssh-keygen -R host_name
No comments:
Post a Comment