Software Engineer @Simpl · Author has 587 answers and 805.8K answer views · 6y ·
You can allow users to log in to remote machines using two ways:
- username/password
- ssh keys
While using ssh keys, the user generates his/her ssh keys (pair of private public keys) using ssh key-gen. Those keys are stored as:
- ~/.ssh/id_rsa.pub (public key)
- ~/.ssh/id_rsa (private key)
Now in order to allow that user ssh login, we can add his/her public key inside ~/.ssh/authorized_keys
file.
Whenever a user tries to log in, his ‘session/activity’ is signed using his/her private key. At the remote server, the respective public key verifies the identity and if it’s matched user is allowed access.
198 views ·
1 of 2 answers
Something went wrong. Wait a moment and try again.