Wednesday, March 12, 2008

How to disable root login through SSH

How to disable root login through SSH.
Before you do this make sure you have created another user in the wheel group.
To disable root login through ssh, edit the following file:
# /etc/ssh/sshd_config
browse to the following line:
PermitRootLogin yes
and change to:
PermitRootLogin no
Save the file and restart ssh.
# /etc/init.d/ssh restart
If you are ssh'd into the server with root when this is done, your connection will fail on the restart of ssh.

To get admin password of plesk

Login to the server through ssh.

# cat /etc/psa/.psa.shadow

How to install Ioncube On Plesk VPS

1) Login into shell through root

2) cd /usr/localDownload the tar.gz file which is compatible with your server from http://downloads.ioncube.com/wget http://downloads.ioncube.com/loader_…lin_x86.tar.gz

3) Untar the file.tar -zxf ioncube_loaders_lin_x86.tar.gz

4) chown -R root:root /usr/local/ioncube/

5) vi /usr/local/Zend/etc/php.ini (or whatever your path is)In Plesk the path is

/usr/local/psa/admin/conf/php.ini

/etc/php.ini

Add the following line before any other zend_extension

zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.4.so

It would go between these two entries

zend_optimizer.version=2.5.10a

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so

Save changes, then:

6) /etc/init.d/httpd restart

PHP upgrade on plesk ?

Hello,
How to upgrade php on Plesk 8.1.x ?

>>Make sure that you have YUM installed on your plesk server. If so then do the following steps
Step 1) Set up the atomic channel:wget -q -O - http://www.atomicorp.com/installers/atomic.sh sh
Step 2) Check all the updated modules version using >>yum update
Step 3) Upgrade the php to the latest version 5.2.x using the following command >>yum update php
Step 4) Replace the PHP 4 ini with PHP 5.2.x's (if applicable)mv /etc/php.ini.rpmnew /etc/php.ini
Step 5) Step 4) Replace the php.conf with the PHP 5.2 php.conf (if applicable)

mv /etc/httpd/conf.d/php.conf.rpmnew /etc/httpd/conf.d/php.conf

Thats all... :)

Combat with spamming On plesk

1. Log into the Plesk >Click- 'Server' > 'Mail'

2. Inside 'Server-wide mail preferences' option-> In the 'Relaying' section - Confirm you have selected 'authorization is required' option and you have ticked the POP3 and SMTP option

3. Check that you have added all local and virtual domains to /var/qmail/control/rcpthosts . Never leave the file rcpthosts as blank as this will lead to an open relay

Where is Internal Plesk Database

Plesk Database installed as a different instance of MySQL and it is running on a different TCP IP port: 8306. It has a database named PSA.
Use the following command to connect to psa database:
mysql -uadmin -p psa -P8306.

Plesk Qmail logs

Plesk Qmail logs
tail -f /usr/local/psa/var/log/maillog
tail -f /var/log/messages
/var/log/mail.info

You can edit the /etc/xinetd.d/smtp_psa file and add -a to exclude the IPs which you dont want to be blocked by the RBL lists:
e.g:
server_args = -Rt0 /usr/sbin/rblsmtpd -a 59.93.244.0 -r relays.ordb.org ..