Sunday, June 19, 2011

Command to kill ssh user

Use the below command to kill ssh user using pts

pkill -9 -t pts/46

This will kill session pts/46

Wednesday, June 15, 2011

Turn off ssl cPanel redirection from command line.

If you are using WHM, from WHM you can turn off the SSL redirtection as follows:

SSL redirection can be found in WHM >> Tweak Settings >> Redirection

Always redirect to SSL [?] On Off = off

If you want to turn off the SSL login URL for the WHM on the server you can simply do it from command line.

You can follow following steps for this:

Login to server as root

Open the file: /var/cpanel/cpanel.config

root@server [~]# vi /var/cpanel/cpanel.config

Check for the line:

requiressl=1
And reset it to
requiressl=0

root@server [~]# /etc/init.d/cpanel restart

Resetting SSH port to 22 via WHM

If you are unable to connect to a cPanel server over SSH:

* because of a forgotten custom SSH port
* having restarted sshd service after making any wrong settings in sshd_config file

- you can still connect to that server via safe sshd service provided by cPanel over port 22 by following the steps below:

* Log in to WHM as root user and browse to the following URL.

http://x.x.x.x:2086/scripts2/autofixer (Replace x.x.x.x with the server IP address)

* You will be presented with an AutoFixer window. Enter
*"safesshrestart"* in the given text field (Enter script name) and click Submit.

It will kill any already running sshd processes and start a new one listening on the default 22 port using the configuration file at /var/cpanel/safe_sshd.

* Connect to the server over SSH via port 22.

* Note down the custom port set in /etc/ssh/sshd_config or fix any errors in it. Once you are ready, restart sshd.

* You should then be able to connect to the regular ssh service running on your custom port if set any.

You can find more information regarding autofixer feature at http://httpupdate.cpanel.net/autofixer/

cPanel: Fantastico is not installed at the default location

If you get the following error when accessing Fantastico (user login):

Quote:
Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it's current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.
To resolve this issue, you can change the option to enable ioncube loaders in WHM > Tweak Settings and then run:

Code:
/scripts/makecpphp

Enabling Virtuozzo with offline-management

Check the following url to access both 8443 plesk and 4643 VZ with offline management

http://forum.parallels.com/showthread.php?t=74654

# vzctl set ${VEID} --save --offline_management yes --offline_service vzpp


View My Stats