I have 2 SSH keys in the gnome-keyring (let's name them AA and BB) and I have a lot of problems because I need to use the BB key(for example for a bitbucket server) and it automatically uses AA key instead. I modified ~/.ssh/config with different configurations with no success. Also the seahorse gui does not have an option to do this.

Basically I want to use in all situations the AA first, and then the BB. Is there a way to do this? thanks

Also I found another problem, if I remove AA key from bitbucket and I have locally AA and BB, then try to clone a repo, I get error, instead of trying with BB key...

Details: I am using key AA for connecting via ssh to remote hosts, I want to use key BB for bitbucket, I have both keys in my ~/.ssh folder.

But when I try to clone the bitbucket repo, it says that I don't have rights(because key AA does not have rights, indeed). When I delete the key AA, bitbucket works perfectly, but I still need key AA for remote ssh.

I modified my ssh config:

Host gitserv Hostname remote.server.com IdentityFile ~/.ssh/id_rsa User remoteusername

LE: I "fixed" this using a hack, by adding the AA key in .ssh/other_keys/ folder and using the above conf, because it seems that gnome-keyring only monitors .ssh folder. It's clearly a bug, I don't know where to address it.

  • Can you provide details on what kind of problems you're seeing? Are you using the command-line to ssh to remote hosts? What were the changes you made to ~/.ssh/config? – Thomas N Mar 12 '18 at 16:41
  • Ok Thomas, I added some details in my original post,thanks – Taw Mar 12 '18 at 17:11
  • And you're using gnome-keyring as your ssh agent, which should load both of these keys (see wiki.gnome.org/Projects/GnomeKeyring/Ssh for details)? So what is the error that you're getting on the command-line? – Thomas N Mar 12 '18 at 19:14
  • I did not change the way gnome keyring works as ssh-agent, but I think it replaces it, because it's the default behaviour in xfce, AFAIK. The error I get on git clone is that AA does not have enough rights to clone that repo. – Taw Mar 12 '18 at 22:37
  • I have this problem and your answer in the original post helped me to solve it, thank you. Here's my related question on SO:stackoverflow.com/q/55665572/9779791 Any updates on how can we solve it without using hacky ways? – mirkancal Apr 14 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.