This guide is about setting up a SSH connection without passwords from a local development environment to a live domain site, the requirements are that you have SSH access to the live domain.
Setting up SSH folder on a Remote Domain
SSH into the domain as the domain owner.
By default some hosting providers do not set up a .ssh folder in the domain home.
Make a secure SSH directory if it doesn’t exist.
mkdir .ssh
Set the permissions so only the domain owner can read/write and execute
chmod go-rwx .ssh/
Create an authorised keys file inside
touch .ssh/authorized_keys
Now grab you local public secure key file and add it to the remote authorized_keys file.
nano .ssh/authorized_keys
Paste and save.
Now make the authorized_keys file secure
chmod a-w .ssh/authorized_keys
Now from Local you can access
Either on the standard SSH port
ssh [email protected]
Or on a non-standard port
ssh [email protected] -p2000
Once you have this set, it makes things like version control a lot easier.