Hi,
https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/
creates an SSH key using `-f` under user's home directory:
ssh-keygen -t ed25519 -b 4096 -C "{username@emaildomain.com}" -f {ssh-key-name}
but the ssh configuration snippet assumes the key was generated under ./ssh :
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/{ssh-key-name}
Unless I'm missing some magic behind the scenes the guide only works since the key was added to the ssh-agent.
It would seem correct and more secure to modify the guide to generate the key under ~/.ssh (instead of ~).
Thanks!
Hi Peter,
Thank you for your quick answer.
I don't see anything in the above man page which suggests ssh-add copies keys to ~/.ssh. It only states that if no files are given the certain default are used.
It is easily shown when tested:
$ ssh-keygen -t ed25519 -b 4096 -C "XXXXXXXXXXXXX" -f test-key
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in test-key
Your public key has been saved in test-key.pub
The key fingerprint is:
SHA256:9hRqgtxVpnZvjXd4GAJPtFqvDhd16PyoVphQd77skko XXXXXXXX.com
The key's randomart image is:
+--[ED25519 256]--+
| +.o |
| + +.....|
| + o.=.+o.|
| . o o o.= O =.|
| o o S o.=oX +|
| + o .o+.B |
| oEo.+ .|
| .+.+ . |
| o+ . |
+----[SHA256]-----+
$ ls test-key*
test-key test-key.pub
$ ls ~/.ssh/test-key*
ls: cannot access '/home/XXXXX/.ssh/test-key*': No such file or directory
$ ssh-add test-key
Identity added: test-key (XXXXXX.com)
$ ls ~/.ssh/test-key*
ls: cannot access '/home/XXXXX/.ssh/test-key*': No such file or directory
Hi @Gabi Davar ,
First off: welcome to the Atlassian Community.
If I read the guide correctly this command:
ssh-add ~/{ssh-key-name}
Actually creates the different files under ~/.ssh/
As explained here: https://linux.die.net/man/1/ssh-add
And that's why that command works as far as I know.
If you feel there is still an error I would suggest using the "Provide Feedback about this article" link at the bottom of the article. That should send your feedback directly to the right team.
I hope that helps.
Cheers,
Peter
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.