Add a user to authorized_keys
Hey there folks, I ran into a task where I needed to add a user to one the machiens so she could SSH into the machine without being prompted to enter the password.
1. You already have root privilages
2. .ssh key directory in /root is created and authorized_keys already exists
Here are the simple steps:
- Navigate to /root/.ssh
- use the vi editor to open the file like so: vi authorized_keys
- Page all the way down and append your public key at the end of the file
You can access it via ssh client, just pull the authorized_keys down to your machine and edit it. After which you’d need to cpy over the file back on to the machine, and BAM. That’s all it it.