I got a server and I want all my users to access using their private key.
- Users generate with
ssh-keygen -t rsa
a couple of public and private key. I'm given the public key, with format:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDe++u83PipzF1YmdJ0/OI2ivt/lR7IED5gQ+IBuN97vayfazKKV8+NAGI3o+Qh1f7kCQk3J9km/9tIAPpWZQWZg95aPwkmx4QuYoI7kn/LLaOYtTgaAqU0z9TzP8k83Sth5D3ET4LnkNrfKUhiPQsN1+WnhRafEv3Hu3+mHU7d8KGVyI7yhRoGWFrmPGwobza0bDsjDrSo70TCcMja8UgUTabukUmF3oj92tVKQZ+doNn4x1084rPKfky+5WGXbcuXTZnmWZRDOMqHsXicXp2m0x26oYJ0lTUnAKzWt25t2weKn24ynZzBEFRJi8ndWG+BKFiQsbSlS8ntWtJ7+9vf test@test-PC
Now in the server, I've created an account called test
and I would like to Authorize such public key with user test
.
I have already set within sshd_config
lines:
Protocol 2
Match User root
PasswordAuthentication no
Match Group foreigners
PasswordAuthentication no
Match all
AuthorizedKeysFile .ssh/authorized_keys``
Should I now insert within authorized_keys
file the public key? If so, how can I bind such key with its desired user (test)?