Configure SSH Access for Remote Collection
To collect data on a remote Linux* system, a password-less SSH connection is required.
A root connection is required to load the sampling drivers and to collect certain performance metrics. You (or your administrator) 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 can still be used.
Use one of the methods below to enable password-less SSH access:
Versions of
Intel® VTune™
older than 2019 Update 5 have a different configuration for password-less SSH. For legacy instructions, see this
article.
Profiler
Enable a Password-less SSH Access from Windows to Linux
For Windows-to-Linux remote analysis, the
VTune
automatically configures a password-less access based on the public key identification.
Profiler
- Create aVTuneproject.Profiler
- In theConfigure Analysiswindow, select theRemote Linux (SSH)target system from theWHEREpane.
- Specify your remote system in theSSH destinationfield asuser@target; for example:root@172.16.254.1.VTuneverifies your SSH connection and, if fails, it generates public/private keys required for enabling the password-less access and reports the results via an interactive terminal window.Profiler
- When the public/private keys are generated, press any key to enter your credentials and letVTuneProfilerautomaticallycopy and apply the public/private keys.Alternatively, you may press Ctrl-C to stop the automation. In this case, you need tomanuallyadd the already generated public/private keys from the paths specified in the terminal window to~/.ssh/authorized_keyson the remote system.VTunedoes not keep your credentials but uses them only once to enable the password-less access.Profiler
When the keys are applied, the terminal window closes and you can proceed with the project configuration and analysis. For all subsequent sessions, you will not be asked to provide credentials for remote accesses to the specified system.
Configure a Password-less SSH Access from Linux/macOS 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:
- Generate the key with an empty passphrase:host> ssh-keygen -t rsa
- Copy the key to target system:host> ssh-copy-iduser@targetAlternatively, if you do not havessh-copy-idon your host system, use the following command:host> cat .ssh/id_rsa.pub | sshuser@target'cat >> .ssh/authorized_keys'
- Verify that a password is not required anymore, for example:host> sshuser@targetls
Possible Issues
If the keys are copied but the
VTune
cannot connect to the remote system via SSH, make sure the permissions for
Profiler
~/.ssh
and home directories, as well as SSH daemon configuration, are set properly.
Permissions
Make sure your
~/.ssh
and
~/.ssh/authorized_keys
directory permissions are not too open. Use the following commands:
chmod go-w ~/ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
SSH Configuration
Check that the
/etc/ssh/sshd_config
file is properly configured for the public key authentication.
For this step, you may need administrative privileges.
If present, make sure the following options are set to
yes
:
RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys
For root remote connections, use:
PermitRootLogin yes
If the configuration has changed, save the file and restart the SSH service with:
sudo service ssh restart sudo service sshd restart (on CentOS)