Connect to a target using an alias
Boundary lets you connect to a target using an alias instead of its target ID, target name, or scope. After you create a target alias, you can substitute it anywhere you'd normally use the -id or -target flag with boundary connect.
Target aliases are also required to use transparent sessions.
- Create a target alias if you haven't already.
- Run
boundary connect <protocol> <alias>in place of the-idor-targetflag, for exampleboundary connect ssh example.alias.boundary.
For example, you can use the following command to connect to an SSH target with the ID ttcp_1234567890:
$ boundary connect ssh -target -id ttcp_1234567890
If you configured an alias named example.alias.boundary for the target, you can now use the alias to connect to the target:
$ boundary connect ssh example.alias.boundary
Aliases are globally unique, so you don't need to specify the scope to connect to the target.
After you verify that you can connect to the target using an alias, you can try to connect to the target using transparent sessions.