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:
-
Set the
PROXY
environment variable to retrieve information about your Teleport cluster by replacingteleport.example.com
with your Teleport cluster domain:$ PROXY=teleport.example.com
-
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'
-
Extract the
web_proxy_addr
for your cluster by running the following command:$ curl https://$PROXY/webapi/ping | jq .proxy.ssh.public_addr