(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
Now login as that user
Make directory .ssh on the remote server and log out
mkdir .ssh
exitPush your ssh key to the authorized_keys file on the remote server
scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys
I guess, the advantage of one single deploy user, when you have more than one developer, is that when one developer do a
git pulland another developer too, some files might get different ownership settings and we have to fix it withchown. I think our problem can also be fixed with proper group rights. Like to hear comments about this. "Proper group rights VS additional deploy user: