WebHostGear.com - the hosting resource for professionalshosting tutorials 
hosting howto webhost guide server managementFebruary 09, 2010
server management, apache tutorials, hosting tutorials, cpanel, server security
Home / Hosting Tutorials / Server Security / Creating a Welcome message for SSH logins

Creating a Welcome message for SSH logins



Printer Friendly Printer Friendly Send to a friend Send to a friend
By : ramprage Rating : Average Rating : 7.67 From 87 Voter(s)

Did you ever want to change or create a new login message antime someone logs into SSH? We'll show you how it's done.

First off login to our server as root. Then type in the following:
pico /etc/motd

Now type in the security login message you wish all users to see once they login to your server through SSH.
Try something like this as a start:

This computer system is for authorized users only. All activity is logged and regulary checked by systems personal. Individuals using this system without authority or in excess of their authority are subject to having all their services revoked. Any illegal services run by user or attempts to take down this server or its services will be reported to local law enforcement, and said user will be punished to the full extent of the law. Anyone using this system consents to these terms.

Now type Ctrl+X then hit Y and enter

Logout of SSH then log back in, you will receive your new greeting!

New! - Need server help? Hire an Expert

Get professional help with your configuration, script installation or server issue.
Learn how we can help you with any server problem and make your server run like new. Professional staff will contact you, after submitting a quote request, by phone or email.

Rate this Article :

1

2

3

4

5

6

7

8

9

10
Poor Excellent

Related Articles


Disable Direct Root Logins
Guide to Chkrootkit - checking for intruders


Discuss this article with others in our new hosting forums

Comments / Feedback

Mark Janssen
If you create a ssh banner file, this will be displayed before people log in, instead of after (with the motd version). Specify 'Banner /etc/banner' in sshd_config
jad madi
edit /etc/profile at the end add uptime date so uptime status and date will appear.
JLChafardet
Mark Janssen
If you create a ssh banner file, this will be displayed before people log in, instead of after (with the motd version). Specify 'Banner /etc/banner' in sshd_config

it didnt worked on my machine.
Skal
I had to reboot to make /etc/banner work.
Walter

Specify 'Banner /etc/banner' in sshd_config

Added to sshd_config, restarted
sshd.
a) If I connect from a Windows box via putty - I do NOT get the banner, BUT
b) use "ssh xxxx" from another Linux box (or the same box), I get the Banner -- so might depend on how you are connecting.

Hope this helps
BMay
I did get the banner with puTTY from a Windoze box.
Viza
you have to restart sshd before it will work
Scott
how do i take off the motd?
Matt
To remove the motd, just delete the information in /etc/motd
Wes
Scott,
Just edit the file as you did before and remove all the text you entered.
Linux GURU
rm -rf /etc/motd

:)
Dave
Worked great, didn't have to reboot my server.
Steve
So if I want a MOTD with the users name, login, and time/date.

How would i start?

IE Wecome to mysever.
Date is:

Your webspace is mydomain/~username

Any webpages you can point me too?
Maarten
You don't have to reboot your machine, sending a HUP-signal to the sshd process will make the sshd reread its config file and apply it.

Thus :
1.) Create the banner file
2.) Insert the Banner-line into the sshd config file
3.) ps -ef | grep sshd
4.) kill -HUP <>

It should work from then on.

 Add Comment
Name
Email
Image Code
Refresh Image

Comments / Feedback



Our site offers free hosting tutorials, cpanel tutorial, web hosting news, shell commands, running a web hosting business, dedicated guides, linux tutorial, apache install, home web server, web server guide, ssh commands, dedicated servers, DNS nameservers, chkrootkit, apf firewall, exim configuration, server compromised, cron backup solution, ftp backup script

Server Tutorials


WebHostGear Reviewed by Ping Zine - Click here

Links:
Lunarpages Coupon