I have an Ubuntu Server and I want only a few PCs to be able to connect to my server via SSH (on port 22). Is there a way that I can create an certificate that I would install on the few PCs that are allowed on the server?
21 Answer
You can use ssh key-based authentication.
Generate private and public ssh key on one of PC using,
ssh-keygen
Configure your ubuntu server's /etc/ssh/sshd_config file
PubkeyAuthentication yesPasswordAuthentication norestart sshd service on ubuntu server
systemctl restart sshd.serviceAdd genetated public key into ubuntu servers /home/users-home/.ssh/authorized_keys
Place generated private key in /home/users-home/.ssh/ path on each PC.