I am an engineer by profession but stopped coding a while back. Despite that once in a while I need these SSH commands. This is my reference
Login to the machine with root.
sudo usermod -aG wheel cherian – Add to wheel group
From local machine
ssh-copy-id cherian@ip address
sudo vi /etc/ssh/sshd_config
follow http://support.hostgator.com/articles/specialized-help/technical/how-to-disable-password-authentication-for-ssh to disable password auth
sudo systemctl restart sshd