I know there are many tutorials, including instructions on this forum but I find that SSH still asks me for a password.
Here is what I tried on the local machine:
ssh-keygen -t rsa # Generate Key Pair, accepting all defaults ssh-copy-id email@example.com # Copy to remote ssh firstname.lastname@example.org # Still asks for password
I have also tried with a custom key:
ssh-keygen -t rsa -f ~/.ssh/test.rsa ssh-copy-id -i ~/.ssh/test.rsa.pub email@example.com ssh-add ~/.ssh/test.rsa ssh -i ~/.ssh/test.rsa firstname.lastname@example.org
In the remote host, I have changed the privileges to
chmod 600 authorized_keys
I have tried all the variations to copy the key to the remote server, but they all give me the same results, and the
authorized_keys file has the same new key.
Many of the tutorials are several years old, and some are for linux, so I don’t know whether things should be different.
Is there an extra step I need to take to use SSH without a password?
I am on MacOS Catalina.
I have turned on verbosity, and I get something like this:
debug1: rekey in after 134217728 blocks debug1: Will attempt key: /Users/me/.ssh/test.rsa RSA SHA256:…etc… debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering public key: /Users/mark/.ssh/test.rsa RSA SHA256:…etc… explicit debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: keyboard-interactive