How Do I Let Only Specific Pcs Connect to via Ssh?
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 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?
1 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.