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:
- In the Forescout Console, open the plugin configuration pane. See Configure the Linux Plugin.
- In the Remote Inspection tab, select View in the CounterACT SSH Connection Details area.
- Copy the key to a clipboard or another application.
- Write a script that does the following on each endpoint you want to manage via Remote Inspection:
- Create the folder
.sshunder the user defined in the Remote Inspection User field of the plugin Configuration pane. - Change the
.sshfolder permissions as follows:chmod 755 .ssh(there is a space between755and the.sshsuffix). - Paste the public key into the file
.ssh/authorized_keys.Save the file. - Change the file
.ssh/authorized_keyspermissions as follows:chmod 644 authorized_keys
- Create the folder