Using the KeyChain package from within Cygwin on a Windows XP Professional laptop. Unfortunately, due to the build insisted upon by my employer, all the usernames in the organisation are six digit numbers. When the keychain script attempts to check for existing ssh-agent instances the command 'ps -u 333333 -f' assumes that the numeric is not the actual username but the userid. It cannot therefore find an existing ssh-agent instance and starts another one regardless. I am able to work around this by changing the line in the script that sets the me variable from: me=`whoami` to: me=`id -u` This uses my actual userid instead of the numeric username and successfully performs the test for an existing ssh-agent. I do not know how widely applicable this fix will be though outside of my Cygwin environment as I have no ability to test further. Reproducible: Always Steps to Reproduce: 1. Create a user with a numeric username 2. Run keychain 3. Run keychain again Actual Results: Keychain launches a new ssh-agent instance each time (and overwrites the existing hostname-sh and hostname-csh files).
Valid linux username don't start with a number (for precisely this reason).
Agreed, but this is Cygwin and not Linux. Hence I'm stuck with the usernames that Cygwin inherits from Windows.