diff --git a/Scripts/install-ssh-client.ps1 b/Scripts/install-ssh-client.ps1 index c17ff7e6..54020ffb 100755 --- a/Scripts/install-ssh-client.ps1 +++ b/Scripts/install-ssh-client.ps1 @@ -15,7 +15,11 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - Add-WindowsCapability -Online -Name OpenSSH.Client* + if ($IsLinux) { + apt install openssh-client + } else { + Add-WindowsCapability -Online -Name OpenSSH.Client* + } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "✔️ installed SSH client in $Elapsed sec" diff --git a/Scripts/install-ssh-server.ps1 b/Scripts/install-ssh-server.ps1 index 2742c595..e6a1563b 100755 --- a/Scripts/install-ssh-server.ps1 +++ b/Scripts/install-ssh-server.ps1 @@ -15,9 +15,13 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - Add-WindowsCapability -Online -Name OpenSSH.Server* - Start-Service sshd - Set-Service -Name sshd -StartupType 'Automatic' + if ($IsLinux) { + apt install openssh-server + } else { + Add-WindowsCapability -Online -Name OpenSSH.Server* + Start-Service sshd + Set-Service -Name sshd -StartupType 'Automatic' + } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "✔️ installed SSH server in $Elapsed sec"