Welcome to UltratechHost Forum, Guest. Please take the time to register if you haven't, or click

Tags
Author: UltratechHost - Replies: 0 - Views: 4878
Display a message when logging in through SSH
If you have ever wanted to display a message to your users when the log in through ssh, you just need to edit a couple of files. The first one is:

vi /etc/motd

This file has the text that will be displayed when an authorized user logs in through SSH. The next change we need to make is to the SSH configuration file, which tell it to display the MOTD (message of the day). The file can be found here, on a CentOS 5 system:

vi /etc/ssh/sshd_config

Look for the line containing PrintMotd an
Author: UltratechHost - Replies: 0 - Views: 4859
Php scripts returning errors when using: php_flag and php_value
Symptom

You have added php_flag and/or php_value directives in your .htaccess file and your Php scripts used to work just fine. Now, your scripts do not work, what's the problem? Looking into your log /usr/local/apache/error_log file, you see the following errors:

Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration
OR
Invalid command 'php_value, perhaps mis-spelled or defined by a module not included in the server co
Author: UltratechHost - Replies: 0 - Views: 4685
Display a message to a user when logging in through SSH
If you have ever wanted to display a message to your users when the log in through ssh, you just need to edit a couple of files. The first one is:

Code:
vim /etc/motd

This file has the text that will be displayed when an authorized user logs in through SSH. The next change we need to make is to the SSH configuration file, which tell it to display the MOTD (message of the day). The file can be found here, on a CentOS 5 system:

Code:
vim /etc/ssh/sshd_config

Look for t
Author: UltratechHost - Replies: 0 - Views: 4595
Alert when an login is done to SSH server
For added security, I modified the .bashrc profile for any users that may have shell access, and added the following, so that when the user logs in, it sends out an email, letting you know that someone has logged in.

Code:
echo ‘ALERT – Root Shell Access (YourserverName) on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” you@yourdomain.com
Of course, you need to modify the (Yourservername) and you@yourdomain.com part.

This little code get
Author: UltratechHost - Replies: 0 - Views: 4586
How to get emails when someone logins into SSH
This is quick tut that basically show you how to make it so that when someone logs in ssh you get a detailed email with their ip, host, ect.

Step 1:

Code:
cd /root

Step 2:

Code:
nano .bashrc

Step 3 :

Scroll to the end of the file and add this.
Code:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com

Replace YourserverName wit