SSH-Key Based Authentication
What is SSH_KEY_BASED_AUTHENTICATION?
- · Users can login to another server without password authentication
- · SSH allows users to authenticate using a private-public key scheme
- · This private key is used as authentication credential like a password.
- · This key is copied to another servers the user wants to log into.
· You can access or log into another server without typing a password every time but it is secure.
In this article, the root user of secondary server is want to enter the primary server without entering a password.
Firstly, you must export ssh-keygen in secondary site with the help of ssh-keygen command.
The public key is stored in /root/.sshd/ (This is the default location). You can modify the location that you want to store your credential keys.
Check your ssh key store file location.
After export ssh key , you can copy this key to your destination server which you want to enter.
Here I copied my ssh_key to primary server with the ssh-copy-id command.
And then log into the primary server whether password is require or not
If you want to log into the secondary site from the primary without typing password, you must follow the steps (vice visa) that I described above.
In the primary, make the step that I describe above.
Hope you enjoy for learning.
Phone Myint Myat
5/10/2019 6:35AM
No comments:
Post a Comment