Can a SSH key be used for temporary access?

Can a SSH key be used for temporary access?

SSH has an option to allow temporary access! Next time you need to provide temporary access for an hour or day, use this great option. We have two machines for this purpose. One is a system running Arch Linux, the client system.

How is asymmetrical encryption used in SSH connection?

The more well-discussed use of asymmetrical encryption with SSH comes from SSH key-based authentication. SSH key pairs can be used to authenticate a client to a server. The client creates a key pair and then uploads the public key to any remote server it wishes to access.

How to generate SSH key pair for Compute Instances?

To access your Compute instances using SSH, generate an SSH key pair, associate the public key with your instances, and use the private key to log in to the instances using SSH. Keep your SSH keys secure. Lay down policies to ensure that the keys aren’t lost or compromised when employees leave the organization or move to other departments.

How to grant temporary access to your server?

The first step is to configure the account on the receiving server. In our case the support user. Add then the CA public key to the authorized_keys file. Ensure that you are copying the public key of the certificate authority. We want to trust only those authentication requests, which are signed by our CA.

How to sign public key with SSH key?

After creating the CA key pair, it is time to sign the user public key with the CA key. If you don’t have an SSH key pair for your user account, create one first. Now we need to copy the public key of the user, to our system which holds the CA key. This way we can sign the public key.

When to use SSH to restrict access to a server?

The configuration and options of SSH are very powerful. This gem is not commonly used, but very powerful to restrict access. It might be a great option to provide temporary access during holidays, or when an external party needs access for just one day. In upcoming blog posts we will dive deeper into the other options.