Install Nessus Agent on Linux Hosts - Bash Script

has anyone created any worklets or required software policy for installing Nessus on linux hosts? This would include configuring the agent with the necessary switches.

I have sort of a process - it’s clunky and I probably stole most of it.

A required software policy that uploads the .deb file and starts the service (need to add the .deb to the policy)

dpkg -i ‘NessusAgent-8.2.4-ubuntu1110_amd64.deb’
service nessusagent start

and then a worklet that links the agent
eval code:
MESSAGE=$(./nessuscli agent status | sed -n 2,2p | awk ‘{print $3}’)
#echo $MESSAGE
if [[ $MESSAGE == “$TARGET” ]]; then

echo “match!”

exit 0


echo “no match!”

exit 1


remediation code:
cd /opt/nessus_agent/sbin
service nessusagent stop
./nessuscli agent link --key=thisisyourlongkey123456asdsffg --cloud
service nessusagent start
exit 0

1 Like

This is helpful, thank you!