F.2. FAQ and examples section

TortoiseGit

F.2. FAQ and examples section

This section is based on the descriptions above and will bring some examples for the usage with TortoiseGit (and plink).

The examples assume that you want to clone [email protected]:/test.git.

F.2.1. How to use a default key for all SSH connections

Start PuTTY, go to Connection->SSH->Auth and select your key. Then go to Session, select Default Settings and hit Save.

Now PuTTY (TortoiseGit and plink) will try to use this key for all new connections (no need to configure it in TortoiseGit). If the PuTTY agent is running, putty and plink try to use an already loaded key, but will ask for the password themselves (as a fallback).

F.2.2. How to connect to a SSH server on a different port

F.2.2.1. All connections to a server should use the different port

Start PuTTY, fill in the servername (example.com here) in the Host Name-field and into the Saved Sessions field. Change the port number to the number you need and click on Save. Now, when TortoiseGit/plink uses this servername the port is automatically loaded from the session.

F.2.2.2. One special connection should use a different port

Start PuTTY, fill in the servername (example.com here) in the Host Name-field and put the servername followed by e.g. a number into the Saved Sessions field (e.g. example.com1 or whatever you like). Change the port number to the number you need and click on Save.

Now, when you want to use this saved session use example.com1 as the servername: Clone [email protected]:/test.git. Plink detects that this is a saved session and loads the correct servername and port from the session.

You can create several sessions for a server with different session names, but make sure you do not use the servername (example.com here) as the exact session name, otherwise these settings will be the default ones if you try to connect to the server (example.com).

F.2.3. How to use two different ssh keys for the same user on the same host

Start PuTTY, fill in the servername (example.com here) in the Host Name-field and put the servername followed by e.g. a number into the Saved Sessions field (e.g. example.com1 or whatever you like). Go to Connection->SSH->Auth and select the key which should be used for this connection. Now go back to Session and hit Save.

Now, when you want to use this saved session use example.com1 as the servername: Clone [email protected]:/test.git. Plink detects that this is a saved session and loads the correct servername and ssh key from the session.