TSF – Giải pháp IT toàn diện cho doanh nghiệp SMB | HCM

PRTG - SSH Sensor Authentication Using SSH Key (Full Tutorial)

PRTG SSH sensors are commonly used to monitor Linux servers and network devices.
By default, many setups still rely on password-based authentication, which increases security risks.
Using SSH key authentication is a best practice that significantly improves security and reliability.
In this tutorial, you will learn how to generate and configure SSH keys for PRTG SSH sensors.
This method eliminates the need to store passwords inside PRTG.
SSH keys also reduce the risk of brute-force attacks and credential leaks.
The guide is suitable for IT administrators and system engineers managing Linux environments.
Follow this tutorial to secure your PRTG SSH monitoring using SSH key authentication.

Step 1: Install Puttygen

Step 2: Create private and public SSH keys (Use Puttygen to create them)

Save public key

Change the private key to openssh (prtg only accepts openssh)

Step 3: Assign the public key to the user

1. Pfsense


Copy the public key and paste it into Pfsense  User  Admin

Enable SSH for Pfsense  System  Advanced

2. Ubuntu/Proxmox VM

🔹 Step 1: Create a user (if not already created)
sudo adduser prtg
________________________________________
🔹 Step 2: Create the .ssh directory
sudo mkdir -p /home/prtg/.ssh
sudo chmod 700 /home/prtg/.ssh
sudo chown prtg:prtg /home/prtg/.ssh
________________________________________
🔹 Step 3: Assign the public key
Open file:
sudo nano /home/prtg/.ssh/authorized_keys
Paste the ENTIRE public key into one line
(for example, starting with ssh-rsa or ssh-ed25519)
________________________________________
🔹 Step 4: Set permissions (EXTREMELY IMPORTANT)
sudo chmod 600 /home/prtg/.ssh/authorized_keys
sudo chown prtg:prtg /home/prtg/.ssh/authorized_keys
________________________________________
🔹 Step 5: Check SSH config
sudo nano /etc/ssh/sshd_config
Make sure it is (or uncommented):
Ctrl + W to search

PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
(Optional – recommended for PRTG):
PasswordAuthentication no
PermitRootLogin no

Restart SSH:
sudo systemctl restart ssh

Step 4: Assign private key to PRTG
On PRTG, add the private key certificate SSH (copy the private key from the openssh file).

You must enter the user as root (even though this user doesn’t exist on pfsense). The root user bypasses the default console interface of pfsense.

Pfsense not monitor ssh memory

If the VM is a different Ubuntu/Proxmox instance, just enter the user you created to get the SSH key.