Install Win32 OpenSSH (test release)
Here are the steps to setup OpenSSH with Git to connect to a repository on GitHub. I use Windows as my main OS and Cmder as my console emulator. Installing the full version you will get Git for Windows which has loads of Unix commands available in your PATH including OpenSSH. The version of Cmder I’m using is 1.3.0. Now copy the SSH key and also add it to you github account. In terminal enter this command with your ssh file name pbcopy ssh/idrsa.pub This will copy the file to your clipboard Now open you github account Go to Settings SSH and GPG keys New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.
Openssh Github
- Generating Your SSH Public Key. Many Git servers authenticate using SSH public keys. In order to provide a public key, each user in your system must generate one if they don’t already have one. This process is similar across all operating systems. First, you should check to make sure you don’t already have a key.
- Example ssh -T git@github.com The authenticity of host 'github.com (140.82.121.3)' can't be established. RSA key fingerprint is SHA256.
Win32-OpenSSH Github releases can be installed on Windows 7 and up. All software for mac free download.
Note these considerations and project scope first.
Download the latest build of OpenSSH.To get links to latest downloads this wiki page.
Extract contents of the latest build to
C:Program FilesOpenSSH
(Make sure binary location has the Write permissions to just to SYSTEM, Administrator groups. Authenticated users should and only have Read and Execute.)In an elevated Powershell console, run the following
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
Open the firewall for sshd.exe to allow inbound SSH connections
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Note:
New-NetFirewallRule
is for Windows 2012 and above servers only. If you're on a client desktop machine (like Windows 10) or Windows 2008 R2 and below, try:Start
sshd
(this will automatically generate host keys under %programdata%ssh if they don't already exist)net start sshd
Optional
- To configure a default shell, see here
- To setup
sshd
service to auto-startSet-Service sshd -StartupType Automatic
- To migrate sshd configuration from older versions (0.0.X.X), see here
Uninstall Win32 OpenSSH
Openssh Github Login
- Start Windows Powershell as Administrator
- Navigate to the OpenSSH directory
cd 'C:Program FilesOpenSSH'
- Run the uninstall script
powershell.exe -ExecutionPolicy Bypass -File uninstall-sshd.ps1