I'm afraid this is not possible at the moment. In the connection you have access to the $EffectiveUsername$, $EffectivePassword$ variables which contain the information of the "resolved" credential. You can't refer to custom fields of a credential like that.
Depending on where you get this information (if you have a PAM system, for example), you could solve this using a dynamic folder script to create the entries dynamically using some sort of script:
For our company, we need to connect to a server via a gateway but ssh tunneling is disabled due to security. Hence we need to connect to the gateway server and then using 'Key sequence task' we do an SSH to the specific server.
But connecting to the gateway is done via credentials (personal user) and then connecting to the server needs to be done via different credentials (NPA).
So to do this manually:
on our local machine: ssh <personalUser>@gateway
enter personal password
on the logged-in gateway: ssh <npa>@target-server
enter NPA password
In Royal TS our setup so far:
Terminal connection to Gateway using personal credentials
- CustomField1 is filled with the URL to the target server
- Tasks -> use key-sequence:
- ssh -q -o StrictHostKeyChecking=no $??$@$CustomField1$
We want to do this to prevent having a separate key-sequence per NPA and per environment and then hardcoding the username and password in the key-sequence.
Is it possible and if so, how can we refer a credential within the key-sequence maybe even using a CustomField from the connection, like for instance:
and then the content of CustomField2 is the name to the specific NPA credentials
1 person has this question