Creating and Testing Secrets for Jumpbox Routes
Overview
This topic shows how to create secrets used for jump server routes by way of an extended example.
We use following scenario:
A target Ubuntu host is only accessible via an SSH proxyjump
directive. The sequence is Secret Server to bastion01.thycotic.com
to bastion02.thycotic.com
to remote-hostname.thycotic.com
, the target Ubuntu host.
As suggested in the Bastion Design Best Practices guide:
-
Both bastion hosts 01 and 02 have changed their default SSH ports for all incoming connections to 2222 and 3333, respectively.
-
Both use a single jump user, betty on bastion01 and wilma on bastion02.
-
Both users have SSH public key authentication enabled and have an
/home/<username>/.ssh/authorized_keys
file storing all the public keys.
You can connect to the target server without Secret Server from any SSH client using the following SSH command, with the built-in SSH ProxyJump directive -J and defined aliases:
$ ssh -J <jumpbox1>, <jumpbox2> <remote-host-target>
...with local ~/.ssh/config
aliases configured this way:
### First Jumpbox
Host jumpbox1
HostName bastion01.thycotic.com
Port 2222
User betty
IdentityFile /home/betty/.ssh/jumpbox1_ssh_rsa
### Second Jumpbox
Host jumpbox2
HostName bastion02.thycotic.com
Port 3333
To replicate this jump scenario using Secret Server, we need to create three new secrets and a new jumpbox route, and then assign that route to the target secret. Once that is done, launching the remote-host-target secret is as simple as clicking the PuTTY launcher icon—the jumpbox route is automatically set up for you.
Task 1: Creating Jumpbox and Target Host Secrets
-
Create a new secret based on the Unix Account (SSH Key Rotation) template with these particulars:
- Secret name: bastion01
- Machine: bastion01.thycotic.com
- Username: betty
-
Upload or generate the private/public key pair. Set a passphrase if necessary.
-
If the key pair is generated, save the public key on the secret to the user’s
/home/betty/.ssh/authorized_keys
file on the jumpbox. -
Create a second new secret also based on the Unix Account (SSH Key Rotation) template with these particulars:
- Secret name: bastion02
- Machine: bastion02.thycotic.com
- Username: wilma
-
Upload or generate the private/public key pair. Set a passphrase if necessary.
-
If the key pair is generated, save the public key on the secret to the user’s
/home/wilma/.ssh/authorized_keys
file on the jumpbox. -
Create a third new secret also based on the Unix Account (SSH Key Rotation) template with these particulars:
- Secret name: remote-host-target
- Machine: remote-hostname.thycotic.com
- Username: remote_user
-
Upload or generate the private/public key pair. Set a passphrase if necessary.
-
If the key pair is generated, save the public key on the secret to the user’s
/home/remote_user/.ssh/authorized_keys
file on the target host.
Task 2: Creating a Jumpbox Route with Secret Levels
- Create a new jumpbox route named flintstone.
- For level 1, select the bastion01 secret and choose 2222 as the port.
- For level 2, Select the bastion02 secret and choose 3333 as the port.
Task 3: Assigning a Jumpbox Route on the Target Secret
-
Open the remote-host-target secret.
-
Ensure SSH proxying is enabled (Security > Enable SSH Proxy) on the secret.
-
Navigate to the secret’s Settings tab.
-
Scroll down to edit the Jumpbox Route section.
-
Select the Flintstone Route in the drop-down.
-
Save your changes.
Task 4: Test Launching the Target Secret with PuTTY Launcher over SSH Proxy
-
Open the remote target secret.
-
Click the General tab.
-
Click the PuTTY Launcher link to begin a new SSH proxy session with a jump server route. The launcher connects to the target via the jump server route:
Task 5: Test Launching the Target Secret with SSH Terminal
-
Note the secret ID of your remote target secret.
-
Using an SSH client, log in to SSH Terminal. See SSH Terminal Administration for details.
-
Enter
cat <secret id>
to view the remote target secret's details: -
Enter
launch <secret id>
to launch the remote target secret with a jumpbox route: -
You should now be connected to remote-hostname.thycotic.com as remote_user.
-
Enter
exit
to return to the terminal.