Running a Web Server as Your Shell User ID

May 22nd, 2010

There is a very nice side effect to running a web server process from a shell as one's own user id - it inherits the ability to use private keys to SSH!

I guess I've been aware of this for some time, but it only recently sunk in when I started using git-wiki to update an ikiwiki git repository and then Ruby's net/ssh capabilities to publish the ikiwiki on a remote machine - I can click a button on the web, and my user (which is running the webserver) runs the ssh process and can hook into the ssh-agent I already have running.

Its actually pretty amazing!


Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022