It works with a classic interactive SSH connection like : ssh root@remote_server (then type the passphrase) but not if I want to unlock automatically without an interactive shell or force pseudo-terminal like : echo "passphrase" | ssh -tt root@remote_server.
Example : matthieu@YYYYYYY:~$ echo 'passphrase' | ssh -tt [email protected] Enter passphrase for key '/home/matthieu/.ssh/id_ed25519': passphrase Connection to 172.19.128.3 closed. matthieu@ YYYYYYY:~$ But the LUKS partition is still locked. For the debug logs : matthieu@ YYYYYYY:~$ echo 'passphrase' | ssh -vvvv -tt [email protected] debug1: OpenSSH_10.0p2 Debian-7, OpenSSL 3.5.4 30 Sep 2025 debug3: Running on Linux 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 debug3: Started with: ssh -vvvv -tt [email protected] debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 19: Including file /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: resolve_canonicalize: hostname 172.19.128.3 is address debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/matthieu/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/matthieu/.ssh/known_hosts2' debug3: channel_clear_timeouts: clearing debug3: ssh_connect_direct: entering debug1: Connecting to 172.19.128.3 [172.19.128.3] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x10 debug1: Connection established. debug1: identity file /home/matthieu/.ssh/id_rsa type 0 debug1: identity file /home/matthieu/.ssh/id_rsa-cert type -1 debug1: identity file /home/matthieu/.ssh/id_ecdsa type -1 debug1: identity file /home/matthieu/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/matthieu/.ssh/id_ecdsa_sk type -1 debug1: identity file /home/matthieu/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /home/matthieu/.ssh/id_ed25519 type 3 debug1: identity file /home/matthieu/.ssh/id_ed25519-cert type -1 debug1: identity file /home/matthieu/.ssh/id_ed25519_sk type -1 debug1: identity file /home/matthieu/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /home/matthieu/.ssh/id_xmss type -1 debug1: identity file /home/matthieu/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_10.0p2 Debian-7 debug1: Remote protocol version 2.0, remote software version dropbear_2025.88 debug1: compat_banner: no match: dropbear_2025.88 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to 172.19.128.3:22 as 'root' debug3: record_hostkey: found key type ED25519 in file /home/matthieu/.ssh/known_hosts:2 debug3: record_hostkey: found key type RSA in file /home/matthieu/.ssh/known_hosts:3 debug3: record_hostkey: found key type ECDSA in file /home/matthieu/.ssh/known_hosts:4 debug3: load_hostkeys_file: loaded 3 keys from 172.19.128.3 debug1: load_hostkeys: fopen /home/matthieu/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug3: order_hostkeyalgs: have matching best-preference key type [email protected], using HostkeyAlgorithms verbatim debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent debug3: receive packet: type 20 debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,[email protected] debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256 debug2: ciphers ctos: [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: ciphers stoc: [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[email protected] debug2: compression stoc: none,[email protected] debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: sntrup761x25519-sha512,[email protected],mlkem768x25519-sha256,curve25519-sha256,[email protected],ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha256,[email protected],[email protected] debug2: host key algorithms: ssh-ed25519,ecdsa-sha2-nistp256,rsa-sha2-256 debug2: ciphers ctos: [email protected],aes256-ctr,aes128-ctr debug2: ciphers stoc: [email protected],aes256-ctr,aes128-ctr debug2: MACs ctos: hmac-sha2-256 debug2: MACs stoc: hmac-sha2-256 debug2: compression ctos: none debug2: compression stoc: [email protected],zlib,none debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug3: kex_choose_conf: will use strict KEX ordering debug1: kex: algorithm: mlkem768x25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:fOvY62bvHbmOmKn/P79rKdztp9IsZy8/B1qYnKg14eU debug3: record_hostkey: found key type ED25519 in file /home/matthieu/.ssh/known_hosts:2 debug3: record_hostkey: found key type RSA in file /home/matthieu/.ssh/known_hosts:3 debug3: record_hostkey: found key type ECDSA in file /home/matthieu/.ssh/known_hosts:4 debug3: load_hostkeys_file: loaded 3 keys from 172.19.128.3 debug1: load_hostkeys: fopen /home/matthieu/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '172.19.128.3' is known and matches the ED25519 host key. debug1: Found key in /home/matthieu/.ssh/known_hosts:2 debug3: send packet: type 21 debug1: ssh_packet_send2_wrapped: resetting send seqnr 3 debug2: ssh_set_newkeys: mode 1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug1: ssh_packet_read_poll2: resetting read seqnr 3 debug1: SSH2_MSG_NEWKEYS received debug2: ssh_set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug2: KEX algorithms: mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,[email protected] debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256 debug2: ciphers ctos: [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: ciphers stoc: [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[email protected] debug2: compression stoc: none,[email protected] debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug3: send packet: type 5 debug3: receive packet: type 7 debug1: SSH2_MSG_EXT_INFO received debug3: kex_input_ext_info: extension server-sig-algs debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],rsa-sha2-256> debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 debug3: receive packet: type 51 debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Will attempt key: /home/matthieu/.ssh/id_rsa RSA SHA256:5lhS69HmDpcTzahu9mQU88x8icoZyxrGDIH0u6TfeuQ debug1: Will attempt key: /home/matthieu/.ssh/id_ecdsa debug1: Will attempt key: /home/matthieu/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/matthieu/.ssh/id_ed25519 ED25519 SHA256:aG+NuP9JsqFN5/MtOESA5AI0qmp+mc90d0RzbZpTCeM debug1: Will attempt key: /home/matthieu/.ssh/id_ed25519_sk debug1: Will attempt key: /home/matthieu/.ssh/id_xmss debug2: pubkey_prepare: done debug1: Offering public key: /home/matthieu/.ssh/id_rsa RSA SHA256:5lhS69HmDpcTzahu9mQU88x8icoZyxrGDIH0u6TfeuQ debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey debug1: Trying private key: /home/matthieu/.ssh/id_ecdsa debug3: no such identity: /home/matthieu/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /home/matthieu/.ssh/id_ecdsa_sk debug3: no such identity: /home/matthieu/.ssh/id_ecdsa_sk: No such file or directory debug1: Offering public key: /home/matthieu/.ssh/id_ed25519 ED25519 SHA256:aG+NuP9JsqFN5/MtOESA5AI0qmp+mc90d0RzbZpTCeM debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 60 debug1: Server accepts key: /home/matthieu/.ssh/id_ed25519 ED25519 SHA256:aG+NuP9JsqFN5/MtOESA5AI0qmp+mc90d0RzbZpTCeM debug3: sign_and_send_pubkey: using publickey with ED25519 SHA256:aG+NuP9JsqFN5/MtOESA5AI0qmp+mc90d0RzbZpTCeM debug3: sign_and_send_pubkey: signing using ssh-ed25519 SHA256:aG+NuP9JsqFN5/MtOESA5AI0qmp+mc90d0RzbZpTCeM Enter passphrase for key '/home/matthieu/.ssh/id_ed25519': debug3: send packet: type 50 debug3: receive packet: type 52 Authenticated to 172.19.128.3 ([172.19.128.3]:22) using "publickey". debug2: fd 4 setting O_NONBLOCK debug1: channel 0: new session [client-session] (inactive timeout: 0) debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Entering interactive session. debug1: pledge: filesystem debug3: client_repledge: enter debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 0: callback start debug2: fd 3 setting TCP_NODELAY debug3: set_sock_tos: set socket 3 IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug1: ssh_tty_make_modes: no fd or tio debug3: send packet: type 98 debug1: Sending environment. debug3: Ignored env SHELL debug3: Ignored env WSL2_GUI_APPS_ENABLED debug3: Ignored env WSL_DISTRO_NAME debug3: Ignored env HOMEBREW_PREFIX debug3: Ignored env NAME debug3: Ignored env PWD debug3: Ignored env LOGNAME debug3: Ignored env WSL_PAC_URL debug3: Ignored env HOME debug1: channel 0: setting env LANG = "en_US.UTF-8" debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env WSL_INTEROP debug3: Ignored env LS_COLORS debug3: Ignored env WAYLAND_DISPLAY debug3: Ignored env INFOPATH debug3: Ignored env TERM debug3: Ignored env USER debug3: Ignored env HOMEBREW_CELLAR debug3: Ignored env DISPLAY debug3: Ignored env SHLVL debug3: Ignored env HTTP_PROXY debug3: Ignored env HOMEBREW_REPOSITORY debug3: Ignored env http_proxy debug3: Ignored env XDG_RUNTIME_DIR debug3: Ignored env WSLENV debug3: Ignored env PATH debug3: Ignored env DBUS_SESSION_BUS_ADDRESS debug3: Ignored env HOSTTYPE debug3: Ignored env PULSE_SERVER debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug3: send packet: type 98 debug3: client_repledge: enter debug2: channel_input_open_confirmation: channel 0: callback done debug2: channel 0: open confirm rwindow 24576 rmax 32759 debug3: obfuscate_keystroke_timing: starting: interval ~20ms debug2: channel 0: read<=0 rfd 4 len 0: closed debug2: channel 0: read failed debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write]) debug2: channel 0: input open -> drain debug2: channel 0: ibuf empty debug2: channel 0: send eof debug3: send packet: type 96 debug2: channel 0: input drain -> closed debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 passphrase debug3: receive packet: type 96 debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: chan_shutdown_write: channel 0: (i3 o1 sock -1 wfd 5 efd 6 [write]) debug2: channel 0: output drain -> closed debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0 debug3: receive packet: type 97 debug2: channel 0: rcvd close debug3: channel 0: will not send data after close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send_close2 debug2: channel 0: send close for remote id 0 debug3: send packet: type 97 debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open: #0 client-session (t4 [session] r0 nm0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1 nc0 io 0x00/0x00) debug3: obfuscate_keystroke_timing: stopping: no active channels (0 chaff packets sent) Connection to 172.19.128.3 closed. debug3: send packet: type 1 Transferred: sent 4148, received 2420 bytes, in 0.0 seconds Bytes per second: sent 120380.5, received 70231.6 debug1: Exit status -1 matthieu@YYYYYYY:~$ This above example does not unlock the LUKS partition on Debian 13 but it does on Debian 12. My dropbear options are : DROPBEAR_OPTIONS="-j -k -s -c cryptroot-unlock" I noticed this behavior as I use Ansible to unlock physical encrypted servers with this task : - name: Unlock LUKS with ssh delegate_to: localhost command: cmd: "ssh -tt root@{{ inventory_hostname }}" stdin: "{{ luks_pwd }}" failed_when: false Matthieu -----Message d'origine----- De : Guilhem Moulin <[email protected]> Envoyé : vendredi 5 décembre 2025 15:50 À : MEURILLON Matthieu (SMEG) <[email protected]>; [email protected] Objet : Re: Bug#1121980: dropbear-initramfs: Can't put password through stdin to unlock LUKS partition since Debian 13 Control: tag -1 unreproducible moreinfo Remote SSH locking does work on my system as well as in the autopkgtest. Please provide a debug trace by adding `set -x` to /usr/share/cryptsetup/initramfs/bin/cryptroot-unlock (and rebuild the initramfs afterwards). > Versions of packages dropbear-initramfs depends on: > pn busybox | busybox-static <none> > pn dropbear-bin <none> > pn initramfs-tools <none> > ii udev 257.8-1~deb13u2 > > Versions of packages dropbear-initramfs recommends: > pn cryptsetup-initramfs <none> Doesn't look like a viable system for dropbear-initramfs. Did you run reportbug(1) on another system? -- Guilhem.

