I have struggled with this a bit but I think it is a common scenario. So for my (future and maybe your) benefit here is the current way I have been setting up SSH under Windows (XP) with cygwin.
- Place the following windows script in the start-up folder, e.g., C:\Documents and Settings\All Users\Start Menu\Programs\Startup:
bash --login c:\cygwin\sshagentrc
- Edit cygwin.bat file so that it looks like this:
REM Script to start ssh-agent each time user logs into machine
bash --login -i
- Place the following code in a file .sshagentrc in the c:\cygwin directory
# Creates an ssh-agent,
# writes ssh agent info to the file '~/.ssh-agent-info-`hostname`'
# and then prompts user for keys.
# Then any shell can use the agent by sourcing the contents of ~/.ssh-agent-info-`hostname`:
# . ~/ssh-agent-info-`hostname`
if test -e $HOME/.ssh/identity; then
/usr/bin/echo "ssh_info: $SSH_INFO_FILE"
/usr/bin/ssh-agent > $SSH_INFO_FILE
/usr/bin/chmod 600 $SSH_INFO_FILE
/usr/bin/echo "ERROR: No private key defined in $HOME/.ssh"
Individual User Setups
- Modify your .bashrc file to include the following lines:
# Hook into SSH agent session
if test -e $SSH_INFO_FILE; then
. $SSH_INFO_FILE > /dev/null
The SVN_SSH is useful when using subversion with ssh (svn+ssh protocol); you can also create a Windows environment variable.
- Goto HOME directory
- Enter the required passphrase (and remember it!)
- This should create a file named identity (or similar) in folder ~/.ssh.
- Email the public key, in files *.pub, to your administrator so that he can add the public key to the required servers.
If you want to run PuTTY (Pageant) as well because you like apps like TortoiseSVN, then
- Import the OpenSSH key into PuTTYgen and create a PuTTY-compatible key (I store it with the OpenSSH keys in my cygwin home directory: c:\cygwin\home\<userid>\.ssh\identity.ppk)
- Place the pageant.exe shortcut into your startup directory
- Modify the short-cut property to “c:\PUTTY_HOME\pageant.exe” “HOME\.ssh\identity.ppk”
This will start up pageant when you log in, asks for your SSH key passphrase and you’re set for the day.
The setup initialises ssh-agent when you log into windows and adds your SSH key to the agent’s session. When starting a cygwin terminal, the .bashrc script ensures that the terminal shares the agent’s session.
Overall, you only have to type in your SSH key’s passphrase once and the rest is easy sailing 😉
The perennial question: Should I buy an Apple or a Windows-based laptop? The question came up recently for me since my old systems were getting a tad too old, and I also happened to come across this blog (a bit outdated of course by now, see below).
Some basic facts as they are available today (March 2008) in the table below. I chose a Dell since it is widely available and a very common and representative competitor.
||Dell XPS M1530
||2.4 GHz Core 2 Duo (?, 3MB L2-cache)
||2.4 GHz Core 2 Duo T7700 (800 MHz FSB, 4 MB L2-cache)
||2 GB memory@667MHz DDR2 SDRAM
||3 GB memory@667MHz DDR2 SDRAM
||GeForce 8600M GT, 256MB SDRAM
||1440 x 900
||1280 x 800
||320 GB@5400 rpm
||Mac OS X v10.5 Leopard
||MS Windows Vista Home Premium
The Dell version has been customised slightly by choosing a faster matching processor.
This is the best match in terms of hardware components I could find. They are quite close: the Dell scores better in the memory and hard-drive specs, the Apple in the resolution.
Hence, we are down to Max OS vs Windows Vista, the various bits of pre-installed software, the quality of the components (hard to judge from the outside) and the very personal matter of taste.
Currently, I personally just can’t get myself to pay a 40% premium for the Apple. One problem for me is that Apple seems to update its hardware specs only infrequently while others constantly upgrade or adjust prices (downwards). And so the Apple laptop starts to look more and more expensive over time. I will keep looking and comparing …
My first jottings are to follow soon …