How to restore your SSH access using WHM Autofixer
If you are locked out and can’t SSH to your server, WHM Autofixer may help you!
Here is process to restore SSH settings and access.
1. Login to your WHM using the following URL:
https://HOSTNAME-OR-IP:2087/scripts2/autofixer
Change the HOSTNAME-OR-IP as appropriate for you.
2. In the Autofixer interface, put the name safesshrestart as shown on the image.
WHM SSH Autofixer
3. Hit the Submit button.
This will restore your SSH configuration and restart your sshd! You should be able to login easily after that!
Restore off a mounted slave disk
rsync -vrplogDtH /mnt/old/usr/local/apache/conf /usr/local/apache
rsync -vrplogDtH /mnt/old/var/named /var
rsync -vrplogDtH /mnt/old/home/* /home
rsync -vrplogDtH /mnt/old/usr/local/cpanel /usr/local
rsync -vrplogDtH /mnt/old/var/lib/mysql /var/lib
rsync -vrplogDtH /mnt/old/var/cpanel /var
rsync -vrplogDtH /mnt/old/usr/share/ssl /usr/share
rsync -vrplogDtH /mnt/old/var/ssl /var
rsync -vrplogDtH /mnt/old/usr/local/cpanel/3rdparty/mailman /usr/local/cpanel/3rdparty
rsync -vrplogDtH /mnt/old/var/log/bandwidth /var/log
rsync -vrplogDtH /mnt/old/usr/local/frontpage /usr/local
rsync -vrplogDtH /mnt/old/var/spool/cron /var/spool
-v, –verbose increase verbosity
-r, –recursive recurse into directories
-l, –links copy symlinks as symlinks
-o, –owner preserve owner (super-user only)
-g, –group preserve group
-D same as –devices –specials
-t, –times preserve modification times
-H, –hard-links preserve hard links
Next from : cd /mnt/old/etc
rsync -vrplogDtH secondarymx domainalias valiases vfilters exim* proftpd* pure-ftpd* passwd* group* *domain* *named* wwwacct.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl /etc