Skip to content

Commit 6bf0a8e

Browse files
committed
Ensure literal keys get a non-blank comment
When adding a literal key, use "Added by clj-ssh" as the comment.
1 parent 76b6e36 commit 6bf0a8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/clj_ssh/ssh.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
agent (as-bytes private-key) (as-bytes public-key))]
170170
(when passphrase
171171
(.decrypt keypair passphrase))
172+
(.setPublicKeyComment keypair "Added by clj-ssh")
172173
(.add id-repo (.forSSHAgent keypair)))))
173174

174175
(and public-key-path private-key-path)

0 commit comments

Comments
 (0)