---
title: "Linux Agent Deployment"
description: "Learn how to deploy the Netwrix Activity Monitor Linux agent: set the agent port, connect with a password, public key, or client certificate, and install."
sidebar_position: 30
---

# Linux Agent Deployment

**Understanding Linux File Activity Monitoring**

The Activity Monitor can be configured to monitor the following:

- Ability to collect all or specific file activity for specific values or specific combinations of
  values

It also lets you feed activity data to other Netwrix products:

- Netwrix Access Analyzer
- Netwrix Threat Manager

Before adding a Windows host to the Activity Monitor, the prerequisites for the target environment
must be met. See the [Linux Agent Server Requirements](/docs/activitymonitor/10.2/requirements/linux-agent.md) topic
for additional information.

## Deploy Linux Agent

**Step 1 –** On the Agents tab, click Add agent to open the Add New Agents window.

![Install New Agent page of the Add New Agents Wizard](/images/activitymonitor/9.0/install/agent/installnew.webp)

**Step 2 –** On the Install New Agent page, enter the server name for the Linux host. Click
**Next**.

![Specify Agent Port](/images/activitymonitor/9.0/install/agent/portdefault.webp)

**Step 3 –** On the Agent Port page, specify the port to be used by the new agent. The default port
is **4498**. Click **Next**.

![Credentials to Connect](/images/activitymonitor/9.0/admin/agents/add/credentialsservers.webp)

**Step 4 –** On the Credentials To Connect To The Servers page, connect to the Linux Server using
either a **User name** and **Password**, or a Public Key.

The options for connecting with a Password are:

- User name
- Password

![Public Key Credentials](/images/activitymonitor/9.0/admin/agents/add/publickey.webp)

The options for connecting with a Public Key are:

- User name
- Private Key

![Client Certificate Credentials](/images/activitymonitor/9.0/admin/agents/add/clientcertificate.webp)

To connect with a Client Certificate, select the **Client Certificate** (for already installed
agents) option. Run the following commands on the Linux machine:

```
cd /usr/bin/activity-monitor-agentd/
./activity-monitor-agentd create-client-certificate --name [name]
```

The Client Certificate option adds an already installed agent to the console without using SSH.

To connect with a public key, select the **Public Key** option. Copy the following command into a
command prompt to generate ECDSA key for public key option:

```
ssh-keygen -m PEM -t ecdsa
```

Netwrix Activity Monitor requires to generate ECDSA Key with a blank passphrase

```
cat ~/.ssh/id_ecdsa.pub >> ~/.ssh/authorized_keys
```

:::note
You must add the public key to authorized keys for Activity Monitor. By default, a
private key is generated at ~/.ssh/id_ecdsa location along with the public key (.pub file). You
can use a different file location. Copy the following command into a command prompt to generate a
private key for Activity Monitor to use:
:::


```
cat ~/.ssh/id_ecdsa
```

**Step 5 –** Click **Connect** to test the connection. If the connection is successful, click
**Next**. If the connection is unsuccessful, see the status message that appears for information on
the failed connection.

![Linux Agent Options](/images/activitymonitor/9.0/admin/agents/add/linuxagentoptions.webp)

**Step 6 –** On the Linux Agent Options page, select which user name to use to run the daemon. To
use root, leave the **Service user name** field blank. Click **Test** to test the connection.

**Step 7 –** Click **Finish**. The Add New Agents window closes, and Activity Monitor deploys and installs the activity agent on the target host.

During the installation process, the status will be **Installing**. If there are any errors,
Activity Monitor stops the installation and lists the errors in the **Agent messages** box.

![Linux Agent Installed](/images/activitymonitor/9.0/admin/agents/add/activitymonitorwithlinuxagentinstalled.webp)

When the Linux agent installation is complete, the status changes to **Installed**. The system configures the monitored host, and the added Linux host appears in the monitored hosts table. See the
[Monitored Hosts & Services Tab](/docs/activitymonitor/10.2/configuration/monitored-hosts/overview.md) topic for additional information.

Once a host has been added for monitoring, configure the outputs you want. See the
[Output for Monitored Hosts](/docs/activitymonitor/10.2/configuration/monitored-hosts/output/output.md) topic for additional information.

:::info
Activity Monitor Agent uses certificates to secure the connection between the Linux Agent and the Console / API Server.
By default, the Agent uses an automatically generated self-signed certificate. The Console and the API Server don't enforce 
validity checks on these self-signed agent certificates.

This self-signed certificate can be replaced with one issued by a Certification Authority. Once replaced, the Console and 
the API Server will ensure the validity of the agent’s certificates.

See the [Certificate](/docs/activitymonitor/10.2/admin/agents/properties/certificate.md) topic for additional information.
:::

## Host Properties for Linux

Configuration settings can be edited through the tabs in the host’s Properties window. The
configurable host properties are:

- [Inactivity Alerts Tab](/docs/activitymonitor/10.2/configuration/monitored-hosts/properties/inactivityalerts.md)

See the [Host Properties Window](/docs/activitymonitor/10.2/configuration/monitored-hosts/properties/overview.md) topic for additional
information.
