Skip to content

Instantly share code, notes, and snippets.

@stephlocke
Last active November 10, 2016 13:27
Show Gist options
  • Save stephlocke/efeceb0aa56707f50fcc to your computer and use it in GitHub Desktop.
Save stephlocke/efeceb0aa56707f50fcc to your computer and use it in GitHub Desktop.
Working with ssh in win10
Import-Module CredentialManager
Import-Module .\posh-git\posh-git.psm1
$keyfile = "id_rsa"
$dir = ".ssh/"
# Need to create the cred in Windows Credential Manager first (can use New-StoredCredential)
$cred = Get-StoredCredential -Target $keyfile
Add-SshKey
# Install-Module -Name Posh-Git
# Alternative as PSGallery version does not have ssh functions exported
## git clone https://github.com/dahlbyk/posh-git.git
Import-Module .\posh-git\posh-git.psm1
# This seems to hold the PS process, despite kicking off a cmd window
# Seperate ps1 for next steps as consequence
Start-SshAgent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment