Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why do you recommend using Putty over OpenSSH to connect to a git server from windows?

Matt Motherway June 17, 2013

msysgit includes all ssh tools and you can share the private key between the command-line and server. You can do that with putty tools, but there are many more steps involved.

2 answers

1 accepted

1 vote
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2013

FWIW you can use PuTTY for the command line too (Git offers the option at setup, it just defaults the other way around).

We recommend PuTTY because it's Windows-native. If you use passphrases with your keys (and really, you should - if you don't your keys are very insecure) then you need to run an agent to avoid typing those passphrases more than once per login. OpenSSH's agent is a command-line affair and can only easily be used from inside the same command line prompt, so it doesn't play very nicely with using a mixture of command line and a GUI tool like SourceTree. In contrast, PuTTY uses a Windows system tray tool called Pageant which can serve any number of apps and sits in your tray for your Windows session. Many people also prefer the GUI tools for generating keys since they're a bit more user-friendly.

SourceTree jumps through the hoops required to make OpenSSH work with passphrases outside a terminal so it's fine if you want to use it, but OpenSSH was designed for Unix/Linux terminals and has to be somewhat shoehorned into working nicely in a Windows GUI setup, hence why we suggest the native tool as a preference. Many people will have already set up their systems for OpenSSH which is fine, but PuTTY can do everything OpenSSH does while being a bit more of a natural fit, so we tend to recommend it to brand new users since they'll probably have an easier ride.

Matt Motherway June 18, 2013

When you say "Git offers the option...", do you mean GitHub for Windows? I just re-installed msysgit, and I didn't see that option.

fourpastmidnight April 10, 2016

He means Git for Windows. And, you will only see that installer wizard page if you have already created a PuTTY SSH session (and to be honest, I don't think it necessarily has to be a SSH session–I think any type of session will do). Otherwise, the installer won't give you the option and will default to using OpenSSH. I only know this because I'm currently working on an MSI installer for Git for Windows. You wouldn't know this about the current Git for Windows installer unless you scrutinize the installer source code.

Yes, this is not what one would expect–so I'm hoping to change that with the MSI installer I'm working on. It's my hope that if I detect PuTTY installed on the user's machine, they will be given the choice to use PuTTY over OpenSSH. If there are no PuTTY sessions, you will be warned, but you can still choose to make PuTTY the default SSH client for Git for Windows.

But, the new MSI installer for Git for Windows is currently under active development and is still a bit far off. So keep an eye out for it. In the meantime, I'm sure there are resources online that can tell you how to switch from OpenSSH to PuTTY for Git for Windows "after the fact".

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2013

I guess it all boils down to personal preference and maybe even policies.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events