using module .\PlatformAbstractLayer.psm1 #covered -i -q -v -l -c -C #todo: -S -F -V -e Describe "Tests for ssh command" -Tags "CI" { BeforeAll { $fileName = "test.txt" $filePath = Join-Path ${TestDrive} $fileName [Machine] $client = [Machine]::new([MachineRole]::Client) [Machine] $server = [Machine]::new([MachineRole]::Server) $client.SetupClient($server) $server.SetupServer($client) $testData = @( @{ Title = 'Simple logon -v option'; LogonStr = "$($server.localAdminUserName)@$($server.MachineName)" Options = "-v" }, @{ Title = 'Simple logon using -C -l option' LogonStr = $server.MachineName Options = "-C -l $($server.localAdminUserName)" } ) $testData1 = @( @{ Title = "logon using -i -q option" LogonStr = "$($server.localAdminUserName)@$($server.MachineName)" Options = '-i $identifyFile -q' }, @{ Title = "logon using -i -v option" LogonStr = "$($server.localAdminUserName)@$($server.MachineName)" Options = '-i $identifyFile -v' }, @{ Title = "logon using -i -c option" LogonStr = "$($server.localAdminUserName)@$($server.MachineName)" Options = '-i $identifyFile -c aes256-ctr' }, <# -V does not redirect to file @{ Title = "logon using -i -V option" LogonStr = "$($server.localAdminUserName)@$($server.MachineName)" Options = '-i $identifyFile -V' SkipVerification = $true },#> @{ Title = 'logon using -i -l option' LogonStr = $server.MachineName Options = '-i $identifyFile -l $($server.localAdminUserName)' } ) } AfterAll { $client.CleanupClient() $server.CleanupServer() } Context "Key is not secured in ssh-agent on server" { BeforeAll { $identifyFile = $client.clientPrivateKeyPaths[0] Remove-Item -Path $filePath -Force -ea silentlycontinue } AfterEach { Remove-Item -Path $filePath -Force -ea silentlycontinue } It '