Grant Anyone Temporary Permissions to Your Computer with SSH

This is a super cute hack for you Linux users out there. If you have played around with SSH, you know it’s the most amazing thing since sliced bread. For tunneling in, tunneling out, or even just to open up a shell safely, it’s the bees knees. If you work on multiple computers, do you know about ssh-copy-id? We had been using SSH for years before stumbling on that winner.

Anyway, [Felipe Lavratti]’s ssh-allow-friend script is simplicity itself, but the feature it adds is easily worth the cost of admission. All it does is look up your friend’s public key (at the moment only from GitHub) and add it temporarily to your authorized_keys file. When you hit ctrl-C to quit the script, it removes the keys. As long as your friend has the secret key that corresponds to the public key, he or she will be able to log in as your user account.

There’s really nothing going on here that you couldn’t do by hand. The script simply automates creating and removing the public key, and uses GitHub as an arbiter of your friend’s identity. If you know their GitHub user name for sure, and they have attached their public key to the account, this is a very streamlined and simple procedure. (We tried it out ourselves, only to find that we hadn’t associated a public SSH key with our account.) That said, it can be extended to any trusted location that serves up public keys.

Looking through our musty archives for an article on SSH tips and tricks, we couldn’t find one. Is that possible, commenteers? That’s something we’ll have to get right on top of so send us your favorite SSH magic. In the mean time, we’ll placate your lust for more Hackaday by tossing up [Al Williams]’s nice writeup of MOSH, a mobile SSH client.


Filed under: internet hacks, linux hacks

// from Hackaday http://ift.tt/2lbqKwy
site=blogger">IFTTT


EmoticonEmoticon

Comments system