How to perform a remote scan: ============================= Target : 34.82.195.191 Command : ./lynis audit system * Step 1: Create tarball mkdir -p ./files && cd .. && tar czf ./lynis/files/lynis-remote.tar.gz --exclude=files/lynis-remote.tar.gz ./lynis && cd lynis * Step 2: Copy tarball to target 34.82.195.191 scp -q ./files/lynis-remote.tar.gz 34.82.195.191:~/tmp-lynis-remote.tgz * Step 3: Execute audit command ssh 34.82.195.191 "mkdir -p ~/tmp-lynis && cd ~/tmp-lynis && tar xzf ../tmp-lynis-remote.tgz && rm ../tmp-lynis-remote.tgz && cd lynis && ./lynis audit system" * Step 4: Clean up directory ssh 34.82.195.191 "rm -rf ~/tmp-lynis" * Step 5: Retrieve log and report scp -q 34.82.195.191:/tmp/lynis.log ./files/34.82.195.191-lynis.log scp -q 34.82.195.191:/tmp/lynis-report.dat ./files/34.82.195.191-lynis-report.dat * Step 6: Clean up tmp files (when using non-privileged account) ssh 34.82.195.191 "rm /tmp/lynis.log /tmp/lynis-report.dat"