Use ssh-agent on Windows

ssh-agent is a part of OpenSSH to setup an agent. An agent is a piece of software to store the private keys in memory and ease agent forwarding. This is a requirement to painless SSH operations.

Mark A. Hershberger explains here a popular way to configure ssh-agent on UNIX system.

When you launch the agent a first time (for example at boot time), it will store the PID and socket file into environment variables (SSH_AGENT_PID and SSH_AUTH_SOCK). The goal of the game is to set these environment variables on every session you’ll launch.

On Windows systems, well… whether you use only your cygwin terminal, whether you script something usable for Windows console or PowerShell sessions. But then, you won’t be able to access your agent from most GUI applications using SSH (some like ActiveState Komodo will allow you to tweak environment variables).

When PuTTY utilities aren’t enough — The ControlMaster story.

At the time of the writing, the popular way is the Windows GUI SSH world is to use the PuTTY products Pageant and plink. That’s fine and works very well, except one caveat: you don’t have the possibility to use ControlMaster.

ControlMaster is an OpenSSH feature to multiplex SSH connections. If you have an open master SSH connection to the server X, you can get a new connection to X without the need to authenticate again. This speeds a lot operations like save a file, launch a version control or debug command (my main scenario use: when I’m writing OS-dependant PHP code I like to test it on Windows and FreeBSD). On my workstation, ssh server hostname with ControlMaster is instantaneous, plink server hostname requires 2 seconds.

A patch: ssh-agent -x

So, to let my fellow Cygwin OpenSSH users the capability to use also scp and ssh with an universally-available agent, I prepared this patch for ssh-agent.c to add a new -x parameter.

This patch applies against the portable OpenSSH version.

To compile OpenSSH on Cygwin you need autoconf and zlib.

Once recompiled with this patch, to launch once for all your agent:
ssh-agent -x
ssh-add [path to key if not in .ssh/]

And enjoy it until your next shutdown or logout.


  • An alternative but non consensual solution is win-ssh-agent, a GUI wrapper written by TAGA Nayuta.
  • To launch GUI software from a shell with the environment variables to propagate such environment, like explained supra in this blog post or here.
  • If you use both PuTTY and OpenSSH, you’ll find interesting ssh-pageant from Josh Stone.

FreeBSD port update: devel/git-review

The devel/git-review port has been updated to the latest version.

Changelog for git-review 1.23

  • Fix str(None) bug in port detection for hook setup
  • Fix pep8 deps for pyflakes version conflict.
  • Expand multiple commit submission warning.

Changelog for git-review 1.22

  • Provide usage help even if not in Git directory
  • Document defaultremote option & site/user configs
  • Allow per-site and per-user Gerrit defaults
  • Add venv testenv to tox.ini.
  • Rename to README.rst for better PyPI display

8 bit music in pure JavaScript

HTML 5 offers a Web Audio API, to add synthesizing audio support in web applications.

Cody Lundquist, an Australian from Sidney, created a 8 bit music audio library built on the top of the Web Audio API, called 8Bit.js Audio Library.

You define a time (e.g. 4/4), a tempo, and you then the notes.

Submitted 2 days on Reddit, the library got a favorable reception, with some people adapting themes. There is even an original composition, rather nice, called Cities.

A LilyPond support is planned, so in the future there could be a possibility to implement this library into the MediaWiki score extension.

Not yet for every browser

  • Safari 6 supports it, so only on iOS and Mac, not yet on Windows.
  • Chrome 10+ supports it, and so Opera 15,
  • Firefox, Internet Explorer and Opera 12 don’t support it.



Thanks to Linedwell for the help during browsers test.