Run Microsoft OpenSSH service in a Windows container.
Why?
You might want to have a test environment to try it out.
docker build -t openssh .
docker run -d -p 2222:22 openssh
ssh -p 2222 User032@localhost
Running cmd /c ver
has an error, appending quotes:
$ ssh -p 2222 User03@localhost cmd /c ver
User03@localhost's password:
'ver"' is not recognized as an internal or external command,
operable program or batch file.
Opened issue PowerShell/Win32-OpenSSH#1373
But it can be fixed by using cmd.exe /c ver
with the exe extension
$ ssh -p 2222 User03@$(dm ip 2019-box) cmd.exe /c ver
[email protected]'s password:
Microsoft Windows [Version 10.0.17763.437]