tests: add support to test against OpenSSH for Windows

Testing against OpenSSH for Windows requires v7.7.0.0 or newer
due to the use of AllowUsers and DenyUsers. For more info see:
https://github.com/PowerShell/Win32-OpenSSH/wiki/sshd_config
This commit is contained in:
Marc Hoersken 2018-11-19 21:05:57 +01:00
parent a57e4786b7
commit 081d374f49
2 changed files with 50 additions and 6 deletions

View file

@ -430,6 +430,16 @@ sub sshversioninfo {
$error = undef;
last;
}
if($tmpstr =~ /OpenSSH[_-]for[_-]Windows[_-](\d+)\.(\d+)(\.(\d+))*/i) {
$major = $1;
$minor = $2;
$patch = $4?$4:0;
$sshid = 'OpenSSH-Windows';
$versnum = (100*$major) + (10*$minor) + $patch;
$versstr = "$sshid $major.$minor.$patch";
$error = undef;
last;
}
if($tmpstr =~ /Sun[_-]SSH[_-](\d+)\.(\d+)(\.(\d+))*/i) {
$major = $1;
$minor = $2;