Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I exactly add ssh to PATH on windows?

When trying to connect to Github on a new (I'm the first to try) Windows work computer, I'm getting this error:

permission denied (Public Key)

Following instructions on Github, I then tried

ssh -vT [email protected]

This told me that

ssh is not recognized as an internal or external command, operable program or batch file

Googling that, I found out that this message means "ssh is not in the PATH".

Trying to add it to my path, I found

Variable name: Path
Variable value: :\Program Files (x86)\Windows Live\Shared

What exactly do I enter to add ssh to the path. I'm not sure if it's

:\Program Files (x86)\Windows Live\Shared\ssh.exe

or something else...

like image 338
Leahcim Avatar asked Dec 19 '11 18:12

Leahcim


People also ask

How do I change the path of SSH Exe?

You need to locate the directory that ssh.exe is in. You then need to go into System Properties (hit WINDOWS KEY+PAUSE), go to Advanced system settings, click Environment Variables... Scroll down in the scrolling window at the bottom, until you see "Path" under "Variable". Click it, click Edit...

How do I add SSH to the putty path?

If Git for windows is installed, Bash shell is installed with ssh and others. Bash shell is aware of the path of ssh. No need to add path of ssh in path environment. Install the PUTTY and go to: C:\Program Files\PuTTY, copy the icon "putty" and paste to C:\WINNT\system32. Done.

How do I set up SSH on Windows 10?

Go to the Settings > Apps > Optional features; Click Add a feature, select OpenSSH Server (OpenSSH-based secure shell (SSH) server, for secure key management and access from remote machines), and click Install You can also install sshd server using PowerShell: Add-WindowsCapability -Online -Name OpenSSH.Server*

How do I add SSH to the Bash shell?

Bash shell is aware of the path of ssh. No need to add path of ssh in path environment. Install the PUTTY and go to: C:\Program Files\PuTTY, copy the icon "putty" and paste to C:\WINNT\system32. Done. Click> start > Run > PUTTY & hit Enter.


2 Answers

You need to locate the directory that ssh.exe is in.

You then need to go into System Properties (hit WINDOWS KEY+PAUSE), go to Advanced system settings, click Environment Variables...

Scroll down in the scrolling window at the bottom, until you see "Path" under "Variable". Click it, click Edit...

Go to the end of the value, add a semi-colon if one isn't there already, and type the path to the directory that ssh.exe is in.

like image 64
Robert Allan Hennigan Leahy Avatar answered Oct 09 '22 03:10

Robert Allan Hennigan Leahy


SSH.exe will be in C:\Program Files\Git\usr\bin

like image 20
Deepak Ramesh Avatar answered Oct 09 '22 01:10

Deepak Ramesh