I just wasted an hour on this, so I hope that explaining the solution here will help someone. If you’re using TortoiseSVN and PuTTY, perhaps using a private key created with PuTTYgen (like me), then this probably applies to you. I’m using Windows XP Pro, but Home is probably the same. I didn’t have this problem before because I just used cygwin’s ssh.exe which worked fine.
PuTTY Internal Error
Invalid Port Number
For TortoiseSVN’s SSH cilent, leave the box blank. Do not choose putty.exe, that doesn’t work. Blank is fine, TortoisePlink is fine. Otherwise you see the error above. When you enter the URL to the repository, use the PuTTY saved session name instead of the server name. For example, if your session is MyConnection, use MyConnection for the server instead of, for example, svn.osafoundation.org.

Oh god, thank you. I completely forgot I set putty in the options!
hey, thought I’d share what worked for me - thank you for getting me on the right track.
in TortoiseSVN>Settings>Network, make sure that “TortoisePlink.exe” is in the SSH field. Even leaving it empty didn’t work for me.
on checkout, here was my string:
svn+ssh://username@myserver.com/path/to/repo
I had also saved a session in Putty called “myserver.com” with my username information.
This was the result of a bunch of trial and error! Hope it works for you.
[...] Fix Invalid Port Number Error with TortoiseSVN and PuTTY at Elliot Lee [...]
thank you sooooo much! i already drove crazy!!
thx
cheers stefan
Thank you, very much!
I spent a lot of time trying to use TotoiseSVN with ssh on a port other than 22.
And now I found this page.
It helps me so much!!!