Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh-add -K ~/.ssh/<private_key_file> no longer works

Alex_Ryan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 10, 2018

The instructions for macOS on the "Setup an SSH key" page say

ssh-add -K ~/.ssh/<private_key_file>

but this does not work:

>ssh-add -K ~/.ssh/bitbucket

ssh-add: illegal option -- K

usage: ssh-add [options] [file ...]

Options:

 -l          List fingerprints of all identities.

 -E hash     Specify hash algorithm used for fingerprints.

 -L          List public key parameters of all identities.

 -k          Load only keys and not certificates.

 -c          Require confirmation to sign using identities

 -m minleft  Maxsign is only changed if less than minleft are left (for XMSS)

 -M maxsign  Maximum number of signatures allowed (for XMSS)

 -t life     Set lifetime (in seconds) when adding identities.

 -d          Delete identity.

 -D          Delete all identities.

 -x          Lock agent.

 -X          Unlock agent.

 -s pkcs11   Add keys from PKCS#11 provider.

 -e pkcs11   Remove keys provided by PKCS#11 provider.

 -q          Be quiet after a successful operation.

This option seems to have been removed from SSH:

ssh-add doesn't support -K to add private key to OS X keychain #514

"We no longer support interaction with the OS X Keychain"

Sep 29, 2015

So, how do I setup an SSH key with bitbucket now?

I don't seem to have the option of specifying a password because my account was created using a google login.

 

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2018

Hi Alex, welcome to the Community!

This is expected behaviour when you log in with a Google account, you'll need to create an App Password to use it with your SSH key. To create an App password:

  1. From your avatar in the bottom left, click Bitbucket settings.
  2. Click App passwords under Access management.
  3. Click Create app password.
  4. Give it a name related to the application that will use the password and select the specific access and permissions.
  5. Copy the generated password and either record or paste it into the application you want to give access. The password is only displayed this one time.

For more info, you can check App Passwords.

Hope that helps,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events