Hack It! #1 – Change the TortoiseSVN SSH port

I used to have a boss who was particularly fond of the ‘quick hack’. So much so that many of us used to cough “Hack It!” whenever he was around. We found this endlessly amusing. This segment is dedicated to him.

TortoiseSVN is really great. Best source control client ever. However, the svn+ssh protocol doesn’t support a non-standard SSH port. e.g. svn+ssh://me@myserver.com:9022/. That’s a bummer, since my employer just changed the SSH port.

In order to Hack It! (TM), just go to TortoiseSVN->Settings->Network and set the SSH client to

C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -P 9022


This is a hack because if you have other repositories they will also start connecting to this funky port. Non-hack suggestions welcome.

11 Responses to “Hack It! #1 – Change the TortoiseSVN SSH port”

  1. Arthur says:

    Thanks for this quick fix, it worked out fine for me 🙂

    One thing to point out though;

    This is not protocol-related but rather tortoisesvn making an ass out of itself (which otherwise is a fine program).

    If it was protocol-related you wouldn’t be able to Hack It (TM) in this way and it would also give problems under every other environment, which it doesn’t.

    I hope they add proper url parsing and / or a port selector soon.

    — Arthur.

  2. peter says:

    Hi Arthur,

    Thanks for the correction regarding the cause of the issue – good point. The fault lies with TortoiseSVN rather than the actual protocol.

    You’d think it would be a relatively easy fix, but in the meantime, just Hack It! (TM)

  3. Unformatt says:

    Thanks for this – I created a batch script which you can point Tortoise at and it will pluck out the port for you and pass it to TortoisePlink


  4. the__phoenix says:

    Thank you very much for this hack!

  5. […] Hack It! #1 – Change the TortoiseSVN SSH port […]

  6. Stuart says:

    Thanks for this, works great – I’ve copied your blog and put into mine, changed a few things to point to 443 as a port – but I’ve credited you for this and I reference this on the post.

    ref : http://www.opensource-knowledge.com/?p=45

  7. Gøran says:

    Thanks for the tip! This led me to try for a more dynamic solution and I’ve tried a different approach, it seems to work (“seems” cause I’ve only tested it against one subversion server). The help message for putty link (and thereby TortoisePlink.exe), states that “host” in the url may be a saved Putty session. This means that you can save a putty session towards your nonstandard ssh server as e.g. “mysvn” using a different ssh port, and then use a standard svn+ssh url to access it, e.g: svn+ssh://user@mysvn/svn/code

  8. Martin says:

    Thanks a lot, i wasted hours on this issue.. the solution was that easy…

    it works fine now!

  9. k00pa says:


    I was just looking for this trick 😛 Why the putty/plink can have the “:3445” port support why default :/

  10. Michael Holroyd says:

    Thanks! The worst part about this is that TortoiseSVN doesn’t even throw and error at connections with :port at the end. How is anyone supposed to know it is ignoring this standard convention?!

  11. […] doesn’t like connecting over ssh+svn using non-22 ports. Instead of the inflexible hack shown here, I prefer this hack. The bat script that worked for […]

Leave a Reply