[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#337484: openssh-client: ssh-add displays password with bad permissions on /dev/tty



Package: ssh
Version: OpenSSH_10.0p2
Followup-For: Bug #337484

Dear Maintainer,

My SSH private keys are stored on password manager. If I access the password
manager remotely via ssh and export the ssh private key to add it into
ssh-agent, it shown my passphrase in clear text on my display.

   * What led up to the situation?
   ssh-add from stdin for example cat test-id_ed25519 | ssh-add - shows the
   passhphrase in clear text
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   ssh on remote host, then do "load the key from a password manager like
   keepassxc", we can simulate it with cat test-id_ed25519 | ssh-add -
   * What was the outcome of this action?
   use a password manager to keep the ssh private key safe.
   * What outcome did you expect instead?
   The ssh passphrase should shown as follow, either blank or something like
   asterisks:
   Enter passphrase for (stdin):
   not as clear text:
   Enter passphrase for (stdin): mytestkey-shown-as-clear-text

This behavior can be found on debian 12 too.

$ export
declare -x COLORTERM="truecolor"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/15020/bus"
declare -x DEB_BUILD_HARDENING="1"
declare -x GPG_TTY="/dev/pts/13"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x MOTD_SHOWN="pam"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_TTY="/dev/pts/13"
declare -x TERM="xterm-256color"
declare -x XDG_RUNTIME_DIR="/run/user/15020"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_ID="2847"
declare -x XDG_SESSION_TYPE="tty"



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

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ssh depends on:
ii  openssh-client  1:10.0p1-7
ii  openssh-server  1:10.0p1-7

ssh recommends no packages.

ssh suggests no packages.


Reply to: