THIS IS A REPOST OF A TUT @ BITME TV all the props go to that user
For those of you who use OVH (.co.uk .net it doesn't matter which) this is important. By default OVH have full SSH access to your server(s).
This applys to all OVH servers. Doesn't matter if they are kimsufi or ovh.net one's - they ALL have this.
These can be removed quite quickly but as you may guess the steps are diffrent for both Windows and Linux (I don't currently have a FreeBSD box to test on, I'll do that after I get another server).
Linux
OVH have access to your root (or if on Ubuntu - admin) account. To remove this you will need to login as root and do the following:
Code:
nano -w ~/.ssh/authorized_keys2
On Ubuntu you need to do the following
Code:
sudo nano -w /root/.ssh/authorized_keys2
You will see two line's normaly that start with the following:
Code:
from="213.186.50.100"
from="::ffff:213.186.50.100"
This is the cache.ovh.net server. You can either comment the lines out by adding a # in front of them or you can delete the whole lines - either works. I prefer to delete them.
Wack ctrl+x to save and close the file and that should be it - as far as I'm aware there's no other SSH backdoors but I've not gone over everything fully.
There is also the RTM (Real Time Monitoring) software that OVH have installed. I have only removed this on Ubuntu and Debian - it doesn't seem to have been installed on Windows. Like above I'll test on other Distro's if wanted at the weekend.
To remove RTM you can do the following:
Code:
nano -w /etc/crontab
Look for the line that reads
Code:
*/1 * * * * root /usr/local/rtm/bin/rtm 20 > /dev/null 2> /dev/null
Delete it. ctrl+x and save the file. That will stop it running, now to remove the software itself - this is a little messy but it works.
Debian, Ubuntu, CentOS, FreeBSD and Other Linux
I've gone through the install scripts for RTM and it seems this is the default folder for all installs - doesn't matter on the Distro. Gentoo use's ebuild's so they can keep it upto date easy. Doing the following command will remove it on everything, but use the one under Gentoo on Gentoo....
Code:
rm -rf /usr/local/rtm/
That should do the job.
Gentoo
Should remove it. Let me know if it doesn't
Windows
This one is nice and easy, open control panel, go to add/remove programs and look for Corp SSH (Remove Only). Uninstall that and it'll remove all the accounts OVH uses too.
There is no RTM software for Windows at current so this doesn't need removing.
AGAIN ALL THANKS GO TO THE ORIGINAL POSTER, NOT MYSELF