Skip to content

Commit

Permalink
add_ssh_known_hosts.ps1 should be platform-agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
Wasapl committed Mar 8, 2018
1 parent 81fcdab commit aeab92e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/enterprise/add_ssh_known_hosts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ foreach ($subnet in $subnets)


Write-Host "Adding SSH known hosts..." -ForegroundColor Cyan
$sshPath = "$env:USERPROFILE\.ssh"
$sshPath = Join-Path "$env:USERPROFILE" ".ssh"
if(-not (Test-Path $sshPath)) {
New-Item $sshPath -ItemType directory -Force
}
Expand Down Expand Up @@ -112,6 +112,7 @@ bitbucket.org,104.192.143.66 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMe
bitbucket.org,104.192.143.67 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
"

[IO.File]::WriteAllText("$sshPath\known_hosts", $contents)
$knownhostfile = Join-Path $sshPath "known_hosts"
[IO.File]::WriteAllText($knownhostfile, $contents)

Write-Host "Known hosts configured" -ForegroundColor Green

0 comments on commit aeab92e

Please sign in to comment.