GateOne icon indicating copy to clipboard operation
GateOne copied to clipboard

Clarification of how to utilize key-based authentication

Open stevenhaddox opened this issue 13 years ago • 3 comments

Firstly, thank you so much for your work on GateOne. A coworker recently showed it to me and I was absolutely floored. It's precisely what I've been looking for for several years.

The only issue I'm really having off-hand is figuring out how to setup / utilize key-based authentication for my users. I can't seem to find it clearly in the docs and I'm guessing I'm not quite as advanced on the matter as I need to be in order to figure it out on my own. I've been using key-based authentication on my servers as a default basic security measure for years and I'd like to maintain that if at all possible.

Thanks again for your great work!

stevenhaddox avatar Jul 25 '13 19:07 stevenhaddox

Gate One has a built-in SSH key manager called the, "SSH Identity Manager". As long as you're using some kind of authentication (e.g. PAM, Google, Kerberos, etc) each user will get their own directory inside gateone/users...

user@SOMEREALM

When you upload or generate an SSH identity via the GUI it will store it just like regular ol' ssh-keygen would inside a .ssh directory inside the user's directory. So if you want to manage user SSH identities on your own you can just muck around with each user's .ssh directory however you see fit.

There's one other aspect that I haven't mentioned: How does Gate One know to use a particular SSH identity? Two ways:

There's the 'default' IDs which are always enabled for all outbound SSH connections. These are set in the gateone/users/user@SOMEREALM/.ssh/.default_ids file. Just put one identity per line:

id_rsa
id_dsa
my_amazon_key

...and it will automatically use those identities when making outbound connections by passing '-i' arguments to the ssh command (e.g. ssh -i /path/to/.ssh/id_rsa).

The other way to tell Gate One (ssh_connect.py, really) to use an identity is to pass it via the ssh:// URL:

[Press Shift-F1 for help]

Host/IP or ssh:// URL [localhost]: ssh://user@host:22/?identities=id_rsa,id_ecdsa

In that example you can see that I provided two identities to use in that outbound connection: 'id_rsa' and 'id_ecdsa'. As long as there's files with those names in the user's .ssh directory they will be passed as '-i /path/to/identity' to the ssh command.

Hopefully that answers your questions... I marked this as a 'documentation issue' because I know I need to do a better job about it.

liftoff avatar Jul 26 '13 02:07 liftoff

This helped immensely! Thanks. Google authentication + setting the default authentication type and copying over my key to the proper gateone/users/<email_address>/.ssh/ worked perfectly but still locks access to said key only to my Google account!

stevenhaddox avatar Jul 26 '13 14:07 stevenhaddox

FYI: I will be adding hooks to the Bookmarks plugin very soon to make it easier for the SSH plugin to tie into it. This will make it much more intuitive to add things like specific SSH keys to bookmarks.

liftoff avatar Feb 26 '14 20:02 liftoff