-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Description
Windows Terminal version
1.20.11781.0 and 1.21.240626002-preview
Windows build number
10.0.19045
Other Software
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Steps to reproduce
Install SSH Server (optional)
For Testing: WSL2 with OpenSSH
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
ip address show
JSON (Fragment)
Profile
{
"name": "wsl",
"commandline": "ssh <user>@<ip of wsl>"
}
Action (in Fragment if preview version)
{
"command": {
"action": "multipleActions",
"actions":
[
{
"action": "newTab",
"profile": "wsl",
"tabTitle": "Test"
},
{
"action": "sendInput",
"input": "<password>"
}
]
},
"name": "wsl"
},
Unfortunately I don't know how to send an ENTER
but when I manually press ENTER
there is no input from sendInput because nothing was inserted into the password field.
It's just an example for those questioning the sendInput with a password. If I want to send other inputs like sourcing an custom bashrc into an ssh session established via keys it also does not work.
Would be a nice addition to know whether its possible to press ENTER
in an sendInput. I have not really found a source for reliable keypresses. I tried a few ASCII Escape Sequences from https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797, but not much luck except for the arrow keys.
Thank you very much!
Expected Behavior
It inserts the sendInput value into the terminal like it's typed by an keyboard.
Actual Behavior
Does nothing