[Bug 2714] Allow specifying a key description when loading from stdin

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue May 9 17:00:13 AEST 2017


Jakub Jelen <jjelen at redhat.com> changed:

           What    |Removed                     |Added
                 CC|                            |jjelen at redhat.com

--- Comment #1 from Jakub Jelen <jjelen at redhat.com> ---
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:
jjelen at jjelen.redhat.com
The key's randomart image is:
+---[RSA 2048]----+
|        o*=o.    |
|   .     ==.     |
|  . .   +oo      |
|   +   .o. .     |
|  +oo.ooS        |
|  =*=*  .o       |
| +o.+ooo+.+      |
|.E.   o*+..+     |
|o.    .o++.      |
$ eval `ssh-agent`
Agent pid 10614
$ ssh-add - < id_rsa
Identity added: (stdin) (jjelen at jjelen.redhat.com)
$ ssh-add -l
2048 SHA256:a70xCiekGbgR7bJdVQk/BUykE21q/jqD7TggnYNmLmY
jjelen at jjelen.redhat.com (RSA)

You are receiving this mail because:
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list