Teleport 16: Advancing Infrastructure Defense in Depth with Device Trust, MFA, and VNET
Jul 25
Virtual
Register Today
Teleport logoTry For Free
Fork me on GitHub

Teleport

Commands to look up cluster addresses

If you aren't sure of what values to use for cluster settings such as the tunnel_addr or web_proxy_addr in resource configuration files, you can often look up the information using command-line tools that parse and extract machine-readable data from JSON files. One of the most common of these tools is jq. You can download jq for most operating systems from the jqlang website.

After you download the program, you can run commands that use the jq program to look up cluster addresses.

To get cluster addresses:

  1. Set the PROXY environment variable to retrieve information about your Teleport cluster by replacing teleport.example.com with your Teleport cluster domain:

    PROXY=teleport.example.com
  2. Extract the tunnel_addr for your cluster by running the following command:

    curl https://$PROXY/webapi/ping | jq 'if .proxy.tls_routing_enabled == true then .proxy.ssh.public_addr else .proxy.ssh.ssh_tunnel_public_addr end'
  3. Extract the web_proxy_addr for your cluster by running the following command:

    curl https://$PROXY/webapi/ping | jq .proxy.ssh.public_addr
0