https://bugzilla.mindrot.org/show_bug.cgi?id=2714

Jakub Jelen <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Jakub Jelen <[email protected]> ---
The private key (in old format) does not have the comment in the file
structure, nor the ssh-add knows the filename of the private key to
pick the comment from the associated public key (by adding the .pub to
the filename).

You can simply use the new OpenSSH format, which has the comment
embedded and works in this use case flawlessly:

$ ssh-keygen -t rsa -o -f id_rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
SHA256:a70xCiekGbgR7bJdVQk/BUykE21q/jqD7TggnYNmLmY
[email protected]
The key's randomart image is:
+---[RSA 2048]----+
|        o*=o.    |
|   .     ==.     |
|  . .   +oo      |
|   +   .o. .     |
|  +oo.ooS        |
|  =*=*  .o       |
| +o.+ooo+.+      |
|.E.   o*+..+     |
|o.    .o++.      |
+----[SHA256]-----+
$ eval `ssh-agent`
Agent pid 10614
$ ssh-add - < id_rsa
Identity added: (stdin) ([email protected])
$ ssh-add -l
2048 SHA256:a70xCiekGbgR7bJdVQk/BUykE21q/jqD7TggnYNmLmY
[email protected] (RSA)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to