Lead Image © scanrail, 123RF.com

Lead Image © scanrail, 123RF.com

Cryptographic key access in the cloud

Gimme the Key

Article from ADMIN 49/2019
By
Cryptographic keys, usually available locally but not on remote computers, can be accessed for use in cloud environments.

Cryptographic keys are usually stored on the hard disk, a smart card, a hardware security module (HSM), or a USB token. Applications that typically use such cryptographic keys are SSH, GnuPG, and crypto frameworks like OpenSSL, NSS, or GnuTLS.

Agent Forwarding

To begin, I'll take a look at SSH. If a user wants to log on to a remote computer by way of public key authentication, the user's public key must be available on the remote computer, usually provided with the help of the ssh-copy-id application. Of course, the user's private key does not leave the local computer, but what happens if the user needs to move on from the remote computer, for example, because it is only a kind of jump host from which you can then log on to other systems in the back end?

Access to the user's private SSH key is required, then, on the remote computer, which is what ssh-agent can deliver. Any private SSH key can be passed to this agent by ssh-add, which then stores the key in memory. If access to one of these keys is necessary, the agent can be addressed through a socket file. The name of this file can be found in the SSH_AUTH_SOCK variable:

# echo "$SSH_AUTH_SOCK"
/tmp/ssh-j3OzPSWatFUl/agent.2395

Agent forwarding allows remote computers to access these agents. When establishing a connection over SSH, you can use the -A option. Alternatively, the option can be stored in the SSH configuration file; the option here is ForwardAgent, which is set to no by default. If you activate forwarding by changing no to yes, all keys known by the SSH agent are displayed after logging in on a remote computer and calling ssh-add -l. Now you can establish another SSH connection by public key-based authentication simply by accessing the key material of the SSH

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus