Last active
November 10, 2016 13:27
-
-
Save stephlocke/efeceb0aa56707f50fcc to your computer and use it in GitHub Desktop.
Working with ssh in win10
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| # 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