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$
{WAIT:800}$??${ENTER}
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:
ssh -q -o StrictHostKeyChecking=no $CustomField2.Username$@$CustomField1${ENTER}{WAIT:800}$CustomField2.Password${ENTER}
and then the content of CustomField2 is the name to the specific NPA credentials