For some oneAPI applications, you must configure a password-less SSH connection for the root user on the target system; for example:
When you finish the configuration steps below you will be able to “ssh into” your remote Linux target from your host development system without a password prompt, as a normal (non-root) user or as a root user.
For an introduction to SSH and how SSH keys work, see SSH Essentials: Working with SSH Servers, Clients, and Keys.
These instructions apply to:
Set up an .ssh directory
On your host development system, follow these steps:
Enter the following commands to create an .ssh directory, set the proper permissions, and CD into the new .ssh directory.
At a Windows CMD prompt
> %HomeDrive% && cd %HomePath% > mkdir .ssh > cd .ssh
At a Linux terminal (bash) prompt
$ cd ~ $ mkdir -p .ssh $ chmod 700 .ssh $ cd .ssh
$ ssh-keygen -t rsa
username = the name used to access the target and target = the IP address or the network hostname of the target
You should be prompted for the non-root user password for your target device.
$ scp id_rsa.pub username@target:id_rsa.pub $ ssh username@target $ cd ~ $ mkdir -p .ssh $ chmod 700 .ssh $ cat ~/id_rsa.pub >>.ssh/authorized_keys $ chmod 600 .ssh/authorized_keys $ exit
Follow this step to confirm that a password is no longer required for your non-root user.
ssh username@target uname -a
$ ssh username@target $ cd ~ $ sudo -E bash
Note that the sudo command should prompt you for your target system's non-root user password.
$ mkdir -p /root/.ssh $ chmod 700 /root/.ssh $ cat ./id_rsa.pub >>/root/.ssh/authorized_keys $ chmod 600 /root/.ssh/authorized_keys
$ exit $ exit
To test the root connection for your target, enter:
$ ssh root@target ls -a
You should see a directory listing of all files located in the /root folder on your target, without the need for a login prompt.
Notes