6 Nov 2009 waffel   » (Journeyer)

using keychain under cygwin

If you want to use the keychain tool under cygwin to aviod entering your passwort for your external server again and agin, you may follow my short guide:

In the follow example I work on my home PC named master and want to use the keychain tool with my server test-server.de.

  1. Install the keychain tool under cygwin
  2. Start you cygwin bash and generate your own private and public key pair:

    Of course you should set a password for your private key. The keys are now in $HOME/.ssh/

  3. Copy your public key from $HOME/.ssh/id_rsa.pub to your test-server.de (in a temporary folder)
  4. Login to your test-server.de
  5. Copy the content of your public key and insert it at the end of your $HOME/.ssh/known_host. If the file does not exists, create a new one.
  6. Logout from your test-server.de
  7. Now you can do the following every time you start your cygwin shell:
  8. Start the keychain tool with your private key:
    /usr/bin/keychain $HOME/.ssh/id_rsa
  9. Source the generated sh file from keychain:
    source $HOME/.keychain/master-sh

    Dependend of your hostname (in my example master) the file name from the keychain directory may differ.

To stop the ssh-agent (which is started in the background from the keychain tool) you may use

keychain -k all

If you have more than one server where you want to connect without retyping the password you can re run steps 3-6 from the guide.

Posted in software Tagged: bash, cygwin, generate, key, keychain, login, ssh, ssh-agent

Syndicated 2009-11-06 13:39:31 from waffel's Weblog

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!