Mercurial, MercurialEclipse, TortoiseHg and SSH Server with Win7

There is problem with the Usercredentials passed by MercurialEclipse to a remote SSH repository. There are two ways to fix this issue, one is to authenticate with a public/private keypair and the use of TortoisePlink/PuttyPlink, the other way is to install openSSh on the Windows machine with cygwin and the openSSH package.

I decided to use the public/private Key authentication with Plink because it’s more comfortable in conjunction with Pageant because you only need to give your password only once, despite if youre using Tortoise or Eclipse. Here is the HowTo:

1. Set up the public/private key authentication as described in the Post here.

### To get TortoiseHg working: ###
2. Find out the path to TortoisePlink.exe. It should be located in your TortoiseHg install directory
3. Locate the path to your private key file (.ppk)
4. To tell TortoiseHg and MercurialEclipse to connect with ssh and the public/private keypair you need to add a config value in
the mercurial.ini. Edit it via TortoiseHg -> File -> Settings -> Edit File and add the following lines
[ui]
username = dwasser
ssh=”C:\Programme\TortoiseHg\TortoisePlink.exe” -ssh -agent -i “C:\Dev\Putty\dwasser.ppk”

Here is a screenshot of the EditFile dialog (be careful, use the String above it contains the -agent property which means that Pageant should be used)

Sometimes there is some trouble with the Windowspath to TortoisePlink.exe. If so, extend your Path Variable to the
Tortoise directory and set the ssh value in the mercurial.ini to:
ssh=TortoisePlink.exe -ssh -agent -i “C:\Dev\Putty\dwasser.ppk”

This is important, because this configuration will be used by TortoiseHg

    and

MercurialEclipse. It tells the Applications to use TortoisePlink as “ssh bridge”.
If you want to use cygwin with openSSH, install it, add the folder cygwin/bin to the PATH variable
of Windows and use the following configuration instead : ssh = C:\yourpathto\cygwin\bin\ssh

5. Now all Actions should work. For example you should be able to clone a repository by clicking
File -> clone and enter an Url in this way ssh://dwasser@192.168.103.64//sources//myproj . Don’t forget to mask the slashes!!

### To get MercurialEclipse working: ###
6. Nothing special here, just create a new Project of type mercurial and enter the URL. Also use an Url of this type: ssh://dwasser@192.168.103.64//sources//myproj

HowTo login with SSH on a remote machine with Putty

HowTo login o a remote machine without a password using Putty and its Tools.

1. Download Putty, Pageant and Puttygen from the Putty Webpage
2. Create a keypair (SSH-RSA2) using Puttygen:

Don’t forget to set a Password!
3. Save the public and the private Key as File. Copy the shown Public Key into the Clipboard.
Set the Folderpermission to chmod 600 and the Filepermission to chmod 700. this is important, because ssh won’t work properly if the permissions are to lazy..
4. Open Putty and connect to your remote maschine. Create a Folder “.ssh” and a File “authorized_keys”
5. Open authorized_keys in vi and paste the public key from your clipboard. Remove all linebreaks to fit the key in one single line. The key should look like this:

6. Open Putty, load your remotemachine profile and add your userame to the machine name:

7. Add the path to the public key to the profile:

8. Test if you can connect to your remotemachine. You should be promted to enter the Password for your private Key. To prevent this you can use the Putty tool Pageant. It’s an agent which holds your private keys decoded in memory. So the Keypassword is given once, the keys can be used by Putty without entering the pass another time. To use pageant, start it and load your private key into it:

Now you should be able to oben a Puttysession without entering a password (exept once in Pageant).

Petition zur Freigabe einer Regattabahn des Fühlinger Sees als Schwimmtrainingsbahn

Seit einiger Zeit schon betreibe ich Triathlon und gehe wie viele andere Sportskollegen
im Sommer immer auf der Bahn 4 der Regattastrecke des Fühlinger Sees schwimmen.

Nun ist der Fühlinger See eigentlich eine Regattabahn für Ruderer und das schwimmen dort nicht erlaubt. Seit Jahren arrangieren sich Schwimmer und Ruderer aber einvernehmlich, indem die Schwimmer auf Bahn 4 schwimmen und die Ruderer die anderen 5 Bahnen nutzen. Bei einer 130m breiten Anlage ist ja auch genug Platz für alle…

Im Laufe der Jahre hat die Zahl der Schwimmer immer weiter zugenommen und einige schwimmen wo sie gerade Lust haben. Dies führt zu gefährlichen Situationen und Konflikten mit den Rudervereinen. Dadurch sieht das Sportamt Handlungsbedarf und plant Verbotsschilder aufzustellen. Wo Verbotsschilder sind, ist in Köln das Ordnungsamt nicht weit..

Um hier einen vernünftigen Weg für alle zu finden, versuchen einige Triathleten, Veranstalter und Vereine eine Lösung zu finden, damit eine Regattabahn zu Trainingszwecken als Schwimmstrecke ausgewiesen wird. Um sie hier zu Unterstützen und der Stadt aufzuzeigen wie viele Schwimmer ein Interesse an einer Freiwasserschwimmstrecke haben, habe ich eine Online Petition geschaltet und würde mich freuen wenn Ihr mitzeichnet: www.wir-für-fühli.de