Skip to content

Commit 576fb21

Browse files
committed
Add ControlMasters to the SSH script
1 parent 9d67eab commit 576fb21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SSH/Setup-SSH.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ if (-not (Test-Path "${ConfigDir}")) {
1818
Write-Host "The SSH configuration was not found at ${ConfigDir}"
1919
return
2020
}
21+
22+
$ControlMasterDir = "${ConfigDir}\controlmasters"
23+
if (-not (Test-Path "${ControlMasterDir}")) {
24+
Write-Host "The SSH ControlMasters directory was not found. Creating it at `"${ControlMasterDir}`"."
25+
New-Item -Path "${ControlMasterDir}" -ItemType "directory"
26+
}
27+
2128
$SSHDir = "${HOME}\.ssh"
2229

2330
# This should be as early as possible to avoid loading the function definitions etc. twice.

0 commit comments

Comments
 (0)