3

I set up an SSH key using GNOME's Seahorse, also known as Passwords and Secrets. The application appears to have saved the private key to ~/.ssh/id_rsa.

I have copied the public key to the server using ssh-copy-id <username>@<host>. However, it still prompts me for the SSH password when attempting to connect.

How can I change it to utilize the key produced by Seahorse? I am attempting to utilize the backup service provided by rsync.net.

1
  • 1
    1. Try e.g. ssh -v username@host true. What does it say about the key? 2. Please confirm you mean "password", not "passphrase". Commented Sep 7 at 10:04

2 Answers 2

8

You can choose the IdentityFile and other options for specific hosts in ~/.ssh/config.

For example, one of the entries in my ~/.ssh/config looks like this:

Host github.com ForwardAgent no ForwardX11 no IdentityFile ~/.ssh/github-id.rsa User git 

You should set it to use the secret key file that matches the public key you copied to the host. If necessary, set the default User name to use for that host too.

Read man ssh_config for full details.

4

Check if the key has been added to the agent. The SSH client needs to know the private key.

The Seahorse SSH agent helps load SSH keys and keep them in memory. It is not a full SSH agent as such, but works in conjuction with the SSH agent from openssh.

The Seahorse SSH agent tries to cache your appropriate SSH keys the first time they are accessed. This is similar to you manually using the 'ssh-add' command. It prompts with a GUI password prompt, and lets you save the passwords in gnome-keyring.

Otherwise, you can also run the following commands:

Temporary setup

You have to force with:

ssh -i YOURKEY USER@IP

Or use it with:

ssh -i YOURKEY -o PasswordAuthentication=no -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes USER@IP 

You can use the displayed options individually or in combination like in the command.

~/.ssh/config

If you want it permanently, you can also add settings to your ~/.ssh/config as shown before by cas.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.