SSH Ephemeral Accounts integration
Overview
Through the SSH Ephemeral Accounts integration option, ephemeral (temporary) users are created and given SSH access. After that, the users are deleted.
Prerequisites
The account with which you wish to integrate with Entitle can be either one of two options:
- A root account that is capable of creating user accounts and modifying user files.
- An alternative account with the privilege to execute specific executables (listed below) using sudo, without requiring a password:
cat
- read file contents.chmod
- change who can read and write a file or directory.chown
- change the owner of a file or directory.mkdir
- create a directory.mv
- move a file.rm
- delete a file.tee
- write to a file.useradd
- add a user.userdel
- delete a user.
- The privilege can be granted to the user by modifying the system's sudoers settings. Entitle highly recommends doing this with the
visudo
executable (which requires an editor to be installed) to protect the Linux machine from becoming inoperable. - Below is an example of modifying sudoers to allow passwordless execution for a single executable:
<username> ALL=(root) NOPASSWD: <executable path>
- The executable path can be identified by running
'which <executable name>
.
General information
- Entitle can manage two types of roles: Regular user access to the machine, and Sudo user access to the machine.
- In both cases, a temporary user will be created by the integration, of whom details will be returned to the user.
- However, only in the Sudo access case, the created user will also be added to the
/etc/sudoers.d
directory. - Eventually, the created user will be deleted, along with the associated with its created files (if they exist).
End-user experience
This section outlines the employees’ experience requesting access to SSH with Entitle.
Upon receiving JIT access using Entitle, the employee will receive a pre-made command for accessing SSH via Teams/Slack.
-
The employee will click the View account details button.
-
When opened, the employee will locate the SSH integration machine's key.
-
In your respective terminal, the employee will copy and paste the command:
-
Note: Microsoft OS is yet to be supported by Entitle for SSH. The employee now has access to the designated machine.
Set up SSH to work with Entitle
Note: all that is needed to integrate SSH with Entitle is the username and key of a Sudo user. One way of generating the key will be explained in the following steps, however, there are many other ways to achieve the same result.
Stage 1: Generate SSH keys
- Open the computer terminal.
- Generate an SSH key using the
ssh-keygen
command:
$ ssh-keygen
- After running
ssh-keygen
, you'll receive two keys:id_rsa
andid_rsa.pub
(or the respective files you provided). - Note: In this guide, when prompted for the private key, please provide the
id_rsa
file. When prompted for the public key, provide theid_rsa.pub
file.- To use the private key with Entitle, you need to replace all new lines with
\n
characters. You can achieve this by usingsed
command for Linux users only:
- To use the private key with Entitle, you need to replace all new lines with
sed 's/$/\\n/' <key_path> | tr -d '\n'
- Replace input.txt with the name of your private key file.
- Below is an example of how a private SSH key will look like.

Stage 2: Set up SSH key authentication on the target machine
- Open the terminal on the target machine.
- Navigate to the
/.ssh
directory for the specific user (e.g.,/home/username/.ssh
). Keep in mind that this user is the same one you will set in the Example JSON configuration. - Within the
/.ssh
directory, create a file namedauthorized_keys
, and paste the public key generated in step 2 to the authorized keys file. You can achieve this by echoing the public key into the file:
~ echo "public_key_content" > /home/username/.ssh/authorized_keys
Note: Failure to place the public key in the authorized_keys
file will result in SSH authentication failure. This is because the private key won't match with any public key.
Creating the integration in Entitle
All that is left to do is create an integration on the Entitle application.
-
Log into Entitle and navigate to the Integrations page.
-
After clicking the Add Integration button, type SSH Ephemeral Accounts in the Application field.
-
Choose the Default Approval Workflow for your integration.
-
Don’t forget to set the Save on field with your configuration, i.e. your own hosted agent or Entitle’s cloud.
-
In the Connection JSON:
- Assign the machine's IP address or domain name to the
host
field. - Paste the private key generated in stage 1, as the value for the
key
field. - Note: In the Connection JSON, it's essential to swap each new line with
\n
character. - Set the
user
field to the username from stage 2 to which the keys were mapped. - Example Connection JSON:
- Assign the machine's IP address or domain name to the
{
"host": "<IP or domain name>",
"key": "<Private-key>",
"user": "<username>"
}
- Click Save, you are done!🎉
Updated 7 days ago