1

I added a ssh alias to use a different key-pair for a certain domain. The key does not have a passphrase. I had followed the directions at https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html and at the end added the ssh key with ssh-add.

I later rebooted and the key wasn't working any more - a git fetch from the console in the repo using the alias failed with a permission error. I looked at ssh-add -l and noticed that the key wasn't there anymore. I looked at ssh-add is not persistent between reboots to understand how to fix this - but it seemed from https://unix.stackexchange.com/a/140107/108129 that if I don't have a passphrase, I shouldn't need to.

Is there something I can do to not require to add the key to the ssh-agent - or an easy way to add it permanently?

Update: my .ssh/config is:

VisualHostKey=yes
Host myproject
  HostName bitbucket.org
  IdentityFile ~/.ssh/myproject
Host *
  User yehosef
Yehosef
  • 221

0 Answers0