guide
ssh
Run the below commands only
Open cmd and run
This is a once in a lifetime time command 😂. Dont run it again and again otherwise it will replace your old keys which might have been used to login to other servers. If you already have ran this command, you will have keys in .ssh folder and you can use that for next steps.
Then Manually copy files
.ssh
id_rsa.pub
to remote directory file ~/.ssh/authorized_keys
ssh yourusername@servername.xyz
.ssh
folder and .ssh/authorized_keys
file is alredy present. If not present use the below commandCopy content of local pc id_rsa.pub
to remote server file ~/.ssh/authorized_keys
You may also need to change/verify the permissions of your home directory to remove write access for the group and others.
source: Stack Overflow
ps -f <PID>