Connecting to the ThousandEyes Virtual Appliance Using SSH (Mac/Linux)

In order to connect to the ThousandEyes VA, you first need to configure the Virtual Appliance with an SSH public key.

Generate an SSH Key

Step 1: Check for SSH Keys

First, we need to check for existing ssh keys on your computer. Open a terminal session and run:

cat ~/.ssh/id_rsa.pub

If it says "No such file or directory" go to step 2. Otherwise, you already have an existing keypair, and you can skip to step 3.

Step 2: Generate a New SSH Key

To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.

ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/your/home/dir/xxxx/.ssh/id_rsa): [Press enter]

Now you need to enter a passphrase.

Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]

Which should give you something like this:

Your identification has been saved in /your/home/dir/.ssh/id_rsa.
Your public key has been saved in /your/home/dir/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected]

Step 3: Add Your SSH Key to the VA

Copy the contents of the public key to your clipboard. The following command can be used on Mac OS X to do so:

On Linux, you can display the public key in a console with the following command:

Copying part is done by selecting the whole public key (starting with "ssh-..." and ending with "...== [email protected]", where "[email protected]" can be anything - it is essentially a comment to distinguish this particular public key from others). Once selected, use combination of "Ctrl+Shift+C" keys to copy selected text to your clipboard.

Copy the Public Key to the ThousandEyes VA

Access the web interface of the Virtual Appliance, and navigate to the Appliance Access tab, then copy the public key (which should be on your clipboard) into the "Add New SSH key" text widget.

The text will show as green if it validates successfully, or red if there is a problem. For most circumstances where there is a problem, remove trailing line feeds.

Create an SSH Connection to the ThousandEyes VA

Once you have a valid public key on the ThousandEyes VA, you can connect. Connections are established to the VA using the thousandeyes user account, with the passphrase specified while creating the SSH key:

The first time you connect to the target virtual appliance, your system will note that the identity has been added.

It is strongly recommended that you use static IP addresses for agents in this circumstance, in order to prevent host key checking problems. When you connect, you'll see a warning similar to the one below:

Once you accept, you're locked into using that IP address unless you modify your list of known hosts. After adding the host, you'll be directed to the home directory of the ThousandEyes VA user.

Now you're connected via SSH.

Troubleshooting Capabilities

In addition to the files and commands available to regular users on a Linux system, the thousandeyes user has access to additional files and commands when you are connected to the appliance that would normally require elevated permissions. The purpose of these files and commands is to facilitate more efficent troubleshooting.

The files and commands listed below are accessible to the thousandeyes user without a sudo password:

  • sudoedit /etc/hosts

  • tcpdump

The following commands require sudo, but do not need a password:

  • halt

  • journalctl (with no arguments)

  • lsof

  • reboot

  • shutdown

You can run systemctl start, stop, restart and status for the following services:

  • te-agent

  • te-browserbot

  • te-va

The following package management commands are available:

  • apt-cache

  • apt-get update

  • apt-get install can be used for the following packages:

    • ntpdate

    • te-agent

    • te-agent-utils

    • te-appliance-sidecar

    • te-browserbot

    • te-pa

    • te-va

    • te-va-unlock

You can use the cat command to view the following logs:

  • /var/log/apt/*.log

  • /var/log/dist-upgrade/*.log

  • /var/log/dmesg

  • /var/log/dmesg.[0-9]*

  • /var/log/kern.log

  • /var/log/kern.log.[0-9]*

You can use the zcat command to view the following compressed logs:

  • /var/log/apt/*.log.[0-9]*.gz

  • /var/log/dist-upgrade/*.log.[0-9]*.gz

  • /var/log/dmesg.[0-9]*.gz

  • /var/log/kern.log.[0-9]*.gz

If troubleshooting requires information from other privileged commands, contact ThousandEyes Support.

For more information about each log file, see the Ubuntu documentation: Viewing and Monitoring Log Files.

Last updated