This article applies to PRTG Network Monitor 17.1.29 or later
How to Fix SSH Sensors That Stop Working in PRTG 17.1.29
PRTG version 17.1.29 includes several important fixes and improvements for the SSH engine that SSH sensors use by default to retrieve monitoring data from a target device. Among others, SSH rights elevation works more reliable after the update to PRTG 17.1.29 or later.
New Option for SSH Rights Elevation
For this purpose, we added the option to run SSH commands using sudo with an explicitly defined password. You can choose this option for the setting SSH Rights Elevation in section Credentials for Linux/Solaris/Mac OS (SSH/WBEM) Systems of group and device settings.
- If sudo does not require a password on the target device, choose the new option Run the command as another user using ‘sudo’ (without password).
- Otherwise, choose the sudo with password option and enter the target user and according password below. This is also the pre-selected option if you have used sudo in previous PRTG versions and might be the cause for your SSH error.
In previous PRTG versions, SSH sensors tried to run sudo commands with the password specified for the Login. They only tried it without a password if the login password did not work and caused a timeout. The new option to define if sudo requires a password or not makes SSH rights elevation more reliable.
Fixing Red SSH Sensors after Update
After updating PRTG to version 17.1.29 (or later) from PRTG 17.1.28 (or earlier), this change for SSH rights elevation can cause SSH sensor errors in two specific cases. Both are password related and require a change in your Credentials for Linux/Solaris/Mac OS (SSH/WBEM) Systems settings.
(1) read_password_prompt timeout
The first SSH failure case is if you get this error message:
Failed to read password prompt from shell (1). Reason: read_password_prompt timeout |
You will receive a read password prompt timeout if you have used the option Run the command as another user using ‘sudo’ in PRTG versions previous to 17.1.29 but sudo does not require a password.
In this case, select the option Run the command as another user using ‘sudo’ (without password) and your SSH sensors will start working again.
Note: Use Multi-Edit to change this option on all devices and groups at once if required.
(2) read_paessh timeout
The second SSH failure case is if you get this error message:
Failed to read paessh command from shell (1). Reason: read_paessh timeout |
You will receive a read paessh timeout if you have used the option Run the command as another user using ‘su’ in previous PRTG versions and defined a password for su, but changed to sudo later.
In this case, PRTG used the password that you have specified for the Login to run a command with sudo. After the update PRTG will use the su password again which is still stored in the PRTG configuration. If the passwords are different, the command will fail.
Please enter the correct password for sudo and your SSH sensors will start working again.
Note: Use Multi-Edit to change this option on all devices and groups at once if required.
More
In general, increase the scanning interval of SSH sensors in case of such timeout errors. Check also the target server for jobs that might slow it down and cause timeout errors.
Add comment