Ssh-uploadkeys – Automate SSH Login with Public Key Authentication

Ssh-uploadkeys – Automate SSH Login with Public Key Authentication

Automate login to an ssh account. This is necessary if you are administering multiple workstations.

As far as I know, ssh-uploadkeys is the first key generation and uploading program on posix (linux-like) that asks for password only once.


Usage

$ ssh-uploadkeys karvinen@example.com
Password: [type your password]

After using ssh-uploadkeys, you can connect without a password:

$ ssh karvinen@example.com


How does it work?

If you don’t yet have a keypair, it is created automatically. Then it is uploaded to account ssh://karvinen@example.com and the necessary setup steps are done. You can also create a similar setup manually, but thanks to ssh-uploadkeys, you don’t need to. Actually ssh-uploadkeys is a bit more verbose than above, but one password prompt is really the only user interaction required.


Install

Download the script and make it runnable.

$ wget http://www.iki.fi/karvinen/ssh-uploadkeys/ssh-uploadkeys
$ chmod u+x ssh-uploadkeys
$ ./ssh-uploadkeys karvinen@example.com

Above we used ‘./’ to run it from current location. To make it work without ‘./’:

$ mkdir -p $HOME/bin/
$ mv ssh-uploadkeys bin/


See also



Posted in Old Site | Tagged , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *