I'm currently trying to get ssh-agent
to work.
No matter what I'm doing, I just can't get the around the password prompt.
For testing I even tried connecting to localhost:
ssh-keygen
to generate theid_rsa
ssh-add id_rsa
in the .ssh folderssh-add -l
shows the correct fingerprintssh user@localhost
still asks me for a passwordeval $(ssh-agent -s)
shows the process running
Is there something else I need to configure before using the ssh-agent?
I tried it with several machines and users, as well as RSA and DSA keys.
I'm using Debian 7 btw.
I would appreciate if someone could give me a hint, where my problem might be.
Best Answer
You generated a
ssh
key. That alone doesn't enable public key authentication, you also need to add the public key to the file~/.ssh/authorized_keys
on the remote machine, to the account you want to log to. The easy way to do that is withssh-copy-id
:or
if the username on the remote host is different from the one on the current machine. This will ask for your password on the remote machine.