How to configure SSH for a passwordless login into your remote machine
- On local machine, run
ssh-keygen
. This creates two files/.ssh/id_rsa.pub
(public key) and/.ssh/id_rsa
(private key). - Still on local machine, run
ssh-copy-id remoteusername@remoteserver
. This copies your public key to remote server. - Now try doing ssh to remote machine, no password should be required.
Ensure:
- Remote machine is running sshd.
- Local machine has relevant terminal with ssh installed.
- Verified on an old mac (local machine) with FreeBSD 14 (server).
❗