Configure SSH Access for Remote Collection

To collect data on a remote Linux* system, configure SSH to work in a password-less mode so it does not prompt for the password on each invocation.

Note

A root connection is required to load the sampling drivers and to collect certain performance metrics. You can configure the system using root permissions and then set up password-less SSH access for a non-root user if desired. For example, build and load the sampling drivers on the target system using root access and then connect to the system and run analysis as a non-root user. If you set up access without using the sampling drivers, then driverless event based sampling data can still be collected.

Use one of the methods below to configure password-less SSH access:

Configure a Password-less SSH Access for Remote Linux Collection (macOS or Linux to Linux)

For remote collection on a Linux target system, set up the password-less mode on the local Linux or macOS host as follows:

  1. Generate the key with an empty passphrase:

    host> ssh-keygen -t rsa

  2. Copy the key to target system:

    host> ssh-copy-id user@target

    Alternatively, if you do not have ssh-copy-id on your host system, use the following command:

    host> cat .ssh/id_rsa.pub | ssh user@target 'cat >> .ssh/authorized_keys'

  3. Verify that a password is not required anymore, for example:

    host> ssh user@target ls

Configure a Password-less SSH Access with PuTTY* (Windows to Linux)

For remote Linux collection with PuTTY* Plink from a Windows system, set up the password-less mode as follows:

  1. Add the path to the PuTTy tools directory to the System variables > PATH variable.

  2. Launch the PuTTY Key Generator using the puttygen.exe file.

  3. Click the Generate button (with all default settings intact) to generate keys.

  4. Click the Save private key button to save the private key to your local drive, for example: C:\Users\user1\private_key.ppk.

  5. Copy the public key from the PuTTY Key Generator window and paste it to the authorized_keys file on the target Linux system. The authorized_keys file is typically found in the .ssh directory for the target user. For the root user, this would be in /root/.ssh. For other users, it would be in the /home directory.

    If the file is absent, create it and set the following permissions:

    chmod 0700 .ssh

    chmod 0644 .ssh/authorized_keys

  6. In the PuTTY Configuration window under the Connection > SSH > Auth category, make sure to have the following settings:

  7. Under the Session category in PuTTY, click Save to save the private key settings for the Default Settings session and apply them to all subsequent sessions.

    Note

    If you already have PuTTY sessions created before generating the private and public key pair, the keys will not be applied to them. So, you have to either remove the previous sessions in PuTTY, disregard them for VTune Amplifier analysis, or specify a private key for such an existing session.

  8. Create and save a new PuTTY session under the target name. This session name should be used for the VTune Amplifier connection.

    For example, you save the session as 172.16.254.1.

    Then, when specifying the SSH connection for your remote Linux target, use the same name as a hostname:

  9. Verify the connection and make sure the password is not required:

    host> plink.exe user@target ls

Configure a Password-less SSH Access with Cygwin* (Windows to Linux)

For remote Linux collection with Cygwin* from a Windows system, set up the password-less mode as follows:

  1. Set the CYGWIN_ROOT environment variable as follows:

    host> export CYGWIN_ROOT=/cygdrive/c/cygwin64

  2. Set a path to the Cygwin bin directory:

    host> export $PATH=$CYGWIN_ROOT/bin:$PATH

  3. Create a user directory in CYGWIN_ROOT/home if it does not exist:

    host> mkdir $CYGWIN_ROOT/home/hostuser

  4. Generate the dsa key with an empty passphrase:

    host> ssh-keygen -t dsa

  5. Set correct permissions on the generated file:

    host> chmod 600 /home/hostuser/.ssh/id_dsa

  6. Make sure the .ssh directory exists in the home directory on your device/card. If it is missing, create it.

    host> ssh user@target mkdir -p .ssh

  7. Copy the generated id_dsa.pub file to the device/card:

    host> scp /home/user/.ssh/id_dsa.pub user@target:.ssh/authorized_keys

In the command console, you can login to a remote target system without a password. VTune Amplifier GUI will try to find the ssh from environment. You may need to add CYGWIN_ROOT\bin into Windows PATH environment variable so that VTune Amplifier GUI can find the ssh command when doing the remote collection.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)