Distribute the Public Key

 

The public key allows SSH-based inspection of the endpoint without the endpoint user's password. This section describes how to create a custom script that distributes the key to endpoints. You may need an endpoint password to distribute the key.

To create a script to distribute the public SSH key:

  1. In the Forescout Console, open the plugin configuration pane. See Configure the Linux Plugin.
  2. In the Remote Inspection tab, select View in the CounterACT SSH Connection Details area.
  3. Copy the key to a clipboard or another application.
  4. Write a script that does the following on each endpoint you want to manage via Remote Inspection:
    1. Create the folder .ssh under the user defined in the Remote Inspection User field of the plugin Configuration pane.
    2. Change the .ssh folder permissions as follows:

      chmod 755 .ssh (there is a space between 755 and the .ssh suffix).

    3. Paste the public key into the file .ssh/authorized_keys. Save the file.
    4. Change the file .ssh/authorized_keys permissions as follows:

      chmod 644 authorized_keys