If you want to disable ssh password login on your remote server for extra security.
here how you can do this –
First you have to generate ssh keys on your Linux machine.
Open your terminal and type
ssh-keygen -t rsa
Then it ask for passphrase its optional.
Once the key is generated push this key into the Server.
cat .ssh/id_rsa.pub | ssh [email protected] ‘cat >> .ssh/authorized_keys’
Now you can login without pw prompt
ssh [email protected]machine
Now After login Disable the password login from remote server
Login to your remote server and open the SSH configuration file for editing by entering the following command:
sudo systemctl restart sshd