Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

python scripts doesnt accept input

Open ai94iq opened this issue 5 years ago • 3 comments

"OpenSSH for Windows" version OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

Client OperatingSystem

Windows 11 2200.71/10.0.22000.0

What is failing

when i do anything gerrit related for the first time on a fresh install, i get a question to allow this device to connect to gerrit host or not, so just answer with yes or no to finish the scipt, this is the script

Expected output terminal allows me to input an answer to procced with the script

Actual output terminal just freezes at that input field and wont let me enter anything

Screenshot 2021-07-17 135731

on the other hand Ubuntu running within WSL accepted input when i ran the same script Screenshot 2021-07-19 182852

ai94iq avatar Jul 19 '21 16:07 ai94iq

I was told to post in here, coming from terminal issues https://github.com/microsoft/terminal/issues/10696

ai94iq avatar Jul 19 '21 16:07 ai94iq

I couldn't reproduce this problem on Windows 21H1 (neither remotely via OpenSSH from Linux into a Windows PowerShell session, nor via cmd.exe or Windows Terminal on the desktop GUI):

PS C:\Users\mgk25> py -V
Python 3.9.6
PS C:\Users\mgk25> ssh -V
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
PS C:\Users\mgk25> py -c "import os; os.popen('ssh seismic date').read()"       
The authenticity of host 'seismic (128.xx.yy.zz)' can't be established.        
ECDSA key fingerprint is SHA256:jexuIw5fGJiAtflT+pJkSquirJzpyl+2MyKKtsyxx/I.    
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Warning: Permanently added 'seismic,128.xx.yy.zz' (ECDSA) to the list of known 
hosts.

The equivalent os.popen('ssh ...').read() part of that Python script does allow me to say yes to that question. Same for the latter os.system('ssh ...') part.

mgkuhn avatar Jul 21 '21 13:07 mgkuhn

i updated windows build yesterday and it seems to be working fine now 👍

ai94iq avatar Jul 23 '21 14:07 ai94iq