Slashdot Mirror


SSH Key Management Part 2

LKH writes "The second part of Daniel Robbins' ssh key management articles is up at developer works. Daniel covers passphrase-less authentication using keychain."

1 of 109 comments (clear)

  1. Or if you want to automate it even more by Bronster · · Score: 4, Interesting
    [~]$ cat .bashrc
    ...
    SSH_AUTH_SOCK=`/bin/ls /tmp/ssh-*/agent.* | cut -f1 -d\ '
    export SSH_AUTH_SOCK
    ...
    [~]$

    This works because the /bin/ls line with the pattern above will only get sockets that you can read, which means either owned by you or you are root (lucky you). It grabs the first one, which is fine for non-root users, though not wonderful if you're root - then again root shouldn't be doing this anyway.

    It works from the console too!

    P.S. - remember to nuke that agent when you've finished, otherwise anyone else who can get in as you has privs on every box that trusts you.