Bug#1040311: openssh: ssh-keygen -C '' creates trailing whitespace in pubkeys

[email protected]
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <168846872760.1031.644522022924205837.reportbug__30836.3748177484$1688468972$gmane$org@debian>
Source: openssh
Version: 1:9.2p1-2
Severity: normal

Dear Maintainer,

If you run:
$ ssh-keygen -f "testkey" -C ''

It creates a public key file testkey.pub with a trailing space:
$ grep ' $' testkey.pub

The -C '' option is supposed to mean "don't add any comment at the end of the pubkey".

Please forward this upstream to fix.

-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-9-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.