Re: remote unlocking via ssh: interactive vs passphrase piping
Vincent Lefevre <[email protected]> Mon, 6 Jul 2026 17:51:51 +0200
| Newsgroups | gmane.linux.debian.user |
|---|---|
| Message-ID | <[email protected]> |
On 2026-07-06 16:11:11 +0200, Vincent Lefevre wrote: > But if I do > > cat file | ssh -T ... > > where "file" is a text file just containing the passphrase, > I get an error: > > X11 forwarding request failed on channel 0 > Please unlock disk nvme0n1p3_crypt > cryptsetup: cryptsetup failed, bad password or options? > > What could be the cause? I've eventually found the issue. This is due to the newline character after the passphrase, which cryptroot-unlock doesn't remove! I could confirm with "echo -n <passphrase> | ssh ...", which works. I've reported the bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141580 (I thought I had tried with "printf %s <passphrase>" earlier, but I may have made a mistake in my test.)