mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Improve install-ssh-client.ps1 and install-ssh-server.ps1
This commit is contained in:
parent
37ade894a1
commit
637d50eaa8
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user