Trying to boot directly into a SSH session with authentication closes itself immediately #19737

Open
opened 2026-01-31 06:52:14 +00:00 by claunia · 0 comments
Owner

Originally created by @ToasterDEV on GitHub (Apr 19, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.0

Other Software

OpenSSH within Ubuntu 22.04.02 LTS running through WSL2.

Steps to reproduce

  1. Create a profile issuing the ssh command to a Linux distro of your choice (For example, C:\WINDOWS\system32\wsl.exe -d Ubuntu ssh -R 52698:localhost:52698 root@192.168.1.1 -p 1025).
  2. Save the profile and attempt to open it.
  3. Since the host we're attempting to access is locked behind an SSH key stored outside the .ssh directory (the private key is stored on a Yubikey through the OpenPGP feature), the console immediately jumps to an exit state before being able to enter the PIN and/or touch the key (Permission denied: (publickey) | root@192.168.1.1: Permission denied (publickey). [process exited with code 255 (0x000000ff)]).

Expected Behavior

The profile should behave as if the same command was called from the distro itself and wait until the key is entered.

Actual Behavior

Using the wsl.exe executable doesn't allow for alternate methods of authentication.

Originally created by @ToasterDEV on GitHub (Apr 19, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621.0 ### Other Software OpenSSH within Ubuntu 22.04.02 LTS running through WSL2. ### Steps to reproduce 1. Create a profile issuing the `ssh` command to a Linux distro of your choice (For example, `C:\WINDOWS\system32\wsl.exe -d Ubuntu ssh -R 52698:localhost:52698 root@192.168.1.1 -p 1025`). 2. Save the profile and attempt to open it. 3. Since the host we're attempting to access is locked behind an SSH key stored outside the `.ssh` directory (the private key is stored on a Yubikey through the OpenPGP feature), the console immediately jumps to an exit state before being able to enter the PIN and/or touch the key `(Permission denied: (publickey)` | `root@192.168.1.1: Permission denied (publickey). [process exited with code 255 (0x000000ff)]).` ### Expected Behavior The profile should behave as if the same command was called from the distro itself and wait until the key is entered. ### Actual Behavior Using the wsl.exe executable doesn't allow for alternate methods of authentication.
claunia added the Issue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 06:52:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19737