(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 deploy
And Update the new password
Now login as that user
Make directory .ssh on the remote server and log out
mkdir .ssh
exit
Push your ssh key to the authorized_keys file on the remote server
scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys
My hostgator server has something called
jailshell
which I guess does not allow access to thesudo
command:Plus, I don't know why this happens? Is it not linux?
And most importantly, can you please elaborate why would we need an extra user called
deploy
? Is there some reason behind it?Thanks Will. You have amazing tutorials.