Oh what a great idea, this is based on chirpy's method,,,
first i created a file called "fixthebiatch.exp" containing the following -
Code:
#!/usr/bin/expect -f
spawn su -
expect "Password: " {
send -- "xxxxxx\r" # Here xxxxxx is the password of root
}
expect "*]#*" {
send -- "/bin/cp -f /home/USERNAME/sshd_config /etc/ssh/sshd_config\r" # REPLACE USERNAME
}
then i uploaded this to /home/USERNAME/ or you may know it as / in USERNAME's ftp
next i created a perl script called "fixsshd.cgi" containing the following -
Code:
#!/usr/bin/perl
use CGI;
my $cgi = CGI->new;
print $cgi->header();
system("/usr/bin/expect /home/USERNAME/fixthebiatch.exp"); # REPLACE USERNAME
print qq{
-----
Well, ... all done here...
};
now upload fixsshd.cgi to /home/USERNAME/public_html (/public_html on FTP) and chmod it to 755...
Obtain a copy of "sshd_config" from a distrobution of OpenSSH and upload it to the same location as "fixthebiatch.exp".
Run the damn script (http://www.yoursite.com/fixsshd.cgi).... sure you dont need me to tell you how to do that....
Now just login to WHM and restart your SSHD Server...
Dont forget to delete the files off your site after....
Thanks chirpy for guiding me in the right path...