Knowledgebase

Clamscan Various SSH Commands Print

  • ClamScan Command, Virus Scanner cPanel
  • 0

To Scan your hosting account with following common SSH Commands,
/usr/local/cpanel/3rdparty/bin/clamscan -r –-remove /home/yourcpanelusernam

Or you can use

clamscan -r –-remove /home/yourcpanelusernam
Above command will find and remove the virus which Clamscan can find. But there are consequences as well, you may loose some files which is having maliscious code which can be important to your site. So we recommend to take the backup first. Or you can use move command which will move any suspiciious or infected files to a specific folder.
/usr/local/cpanel/3rdparty/bin/clamscan -r --move=/home/cpaneluser/virus /home/cpaneluser
Where you need to create the folder "virus" in your cpanel folder or if you want to put into the public_html then.
/usr/local/cpanel/3rdparty/bin/clamscan -r --move=/home/cpaneluser/public_html/virus /home/cpaneluser

You can also setup a cron job into your cPanel where you can make it run on an interval so you do not need to track your viruses.


Was this answer helpful?

« Back