Created
February 10, 2023 19:45
-
-
Save skyhoshi/5f165e5fe6993172912786c60ea0d9f0 to your computer and use it in GitHub Desktop.
Create a new SSH Key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$RootProfileStore = "$($env.USERPROFILE)\.ssh"; | |
$StoreLocation = "\"; | |
$Filename = "NameOfSSHFile" | |
$PrefixFilename = "$(Filename).ssh" | |
$PathOnly = "$RootProfileStore$StoreLocation" | |
if (!(Test-Path -Path $PathOnly)){ | |
New-Item -Path $PathOnly -ItemType Directory; | |
} | |
$Extension = "Id_rsa"; | |
$FileName = "$($PrefixFilename).$($Extension)"; | |
$FullPath = "$($PathOnly)$($FileName)" | |
ssh-keygen -f $FullPath ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment