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

PermitTTY no

Open claudioezz opened this issue 3 years ago • 2 comments

Troubleshooting steps https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps

Terminal issue? please go through wiki https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH

Please answer the following

"OpenSSH for Windows" version ((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion) 8.9.1.0 Server OperatingSystem ((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName) Windows Server 2019 Standard Client OperatingSystem Windows Server 2019 Standard What is failing from original configuration i have modified only PermitTTY directive from yes to no Expected output block interactive access /client_loop: send disconnect: Connection reset by peer Actual output Interactive session

Adding command cmd or powershell to connection string, I'm able to doing an SSH interactive session with the target server example :

ssh [user]@[machine] cmd ssh [user]@[machine] powershell

claudioezz avatar Jun 14 '22 16:06 claudioezz

@claudioezz, did you restart sshd after you modified the configuration?

tgauth avatar Jun 15 '22 17:06 tgauth

yes,

Il mer 15 giu 2022, 19:05 Tess Gauthier @.***> ha scritto:

@claudioezz https://github.com/claudioezz, did you restart sshd after you modified the configuration?

— Reply to this email directly, view it on GitHub https://github.com/PowerShell/Win32-OpenSSH/issues/1953#issuecomment-1156721915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ2OFSCP2BTHTNODLDTL7PDVPIEMFANCNFSM5YYH7U2A . You are receiving this because you were mentioned.Message ID: @.***>

claudioezz avatar Jun 16 '22 12:06 claudioezz

I also was able to get a command line, with permitTTY=no If the client specifies ssh -T the command line is available. If I do not specify -T, the command line is not permitted... as configured and expected.

mike-brearton-dtl avatar Aug 11 '22 04:08 mike-brearton-dtl

Ok, thanks.

Il gio 11 ago 2022, 06:13 mike-brearton-dtl @.***> ha scritto:

I also was able to get a command line, with permitTTY=no If the client specifies ssh -T the command line is available. If I do not specify -T, the command line is not permitted... as configured and expected.

— Reply to this email directly, view it on GitHub https://github.com/PowerShell/Win32-OpenSSH/issues/1953#issuecomment-1211534462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ2OFSF27YE6MK6NMHQCV6TVYR4U5ANCNFSM5YYH7U2A . You are receiving this because you were mentioned.Message ID: @.***>

claudioezz avatar Aug 13 '22 07:08 claudioezz

Fix will be in the next release (v9.1) coming up soon.

vthiebaut10 avatar Nov 08 '22 20:11 vthiebaut10