From 5c1c67b13638e27cb0f2c291e4f86138d57f86d9 Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Wed, 19 Jun 2024 16:40:54 -0500 Subject: [PATCH] Check for SSH Key prior to trying to create one --- setup.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.ps1 b/setup.ps1 index 6e322e4..11c30b1 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -150,7 +150,7 @@ do { InstallTheApps $Apps Invoke-WebRequest https://cdn.files.community/files/download/Files.Stable.exe -OutFile $HOME/Downloads/Files.Stable.exe - & "$HOME\Downloads\Files.Stable.exe" + & "$HOME/Downloads/Files.Stable.exe" } "2" { @@ -196,10 +196,15 @@ do { winget uninstall Microsoft.OneDrive Microsoft.OneDriveSync_8wekyb3d8bbwe } '6'{ + + + Write-Host "Make sure SSH Client is installed" Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 - Write-Host "Create SSH Key" - ssh-keygen -t ed25519 + Write-Host "Check for SSH Key Create if needed" + if (-not (Test-Path $env:USERPROFILE\.ssh\id_ed25519)){ + ssh-keygen -t ed25519 + } Write-Host "Start SSH Agent" Get-Service ssh-agent | Set-Service -StartupType Automatic Start-Service ssh-agent