Creating a Welcome message for SSH logins Published: Oct 31, 2003
  • Rating

    4/5

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.

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!

  • Rating

    4/5

Related Articles

Comments (15)

  • Gravatar - Mark Janssen
    Mark Janssen 16:39, November 30, 2003
    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
  • Gravatar - jad madi
    jad madi 15:47, May 20, 2004
    edit /etc/profile
    at the end add
    uptime
    date
    so uptime status and date will appear.
  • Gravatar - JLChafardet
    JLChafardet 19:54, November 2, 2004
    Mark Janssen <br />
    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<br />
    <br />
    it didnt worked on my machine.
  • Gravatar - Skal
    Skal 00:32, June 9, 2005
    I had to reboot to make /etc/banner work.
  • Gravatar - Walter
    Walter 03:13, June 13, 2005
    <snip><br />
    Specify 'Banner /etc/banner' in sshd_config<br />
    <end snip><br />
    Added to sshd_config, restarted<br />
    sshd.<br />
    a) If I connect from a Windows box via putty - I do NOT get the banner, BUT<br />
    b) use "ssh xxxx" from another Linux box (or the same box), I get the Banner -- so might depend on how you are connecting.<br />
    <br />
    Hope this helps
  • Gravatar - BMay
    BMay 19:23, July 28, 2005
    I did get the banner with puTTY from a Windoze box.
  • Gravatar - Viza
    Viza 06:35, September 29, 2005
    you have to restart sshd before it will work
  • Gravatar - Scott
    Scott 22:16, October 19, 2005
    how do i take off the motd?
  • Gravatar - Matt
    Matt 04:30, November 10, 2005
    To remove the motd, just delete the information in /etc/motd
  • Gravatar - Wes
    Wes 15:54, November 10, 2005
    Scott,<br />
    Just edit the file as you did before and remove all the text you entered.
  • Gravatar - Linux GURU
    Linux GURU 16:55, November 13, 2005
    rm -rf /etc/motd <br />
    <br />
    :)
  • Gravatar - Dave
    Dave 06:22, January 9, 2007
    Worked great, didn't have to reboot my server.
  • Gravatar - Steve
    Steve 17:58, August 14, 2007
    So if I want a MOTD with the users name, login, and time/date.<br />
    <br />
    How would i start?<br />
    <br />
    IE Wecome <user> to mysever.<br />
    Date is:<br />
    <br />
    Your webspace is mydomain/~username<br />
    <br />
    Any webpages you can point me too?
  • Gravatar - Maarten
    Maarten 11:08, May 19, 2008
    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.<br />
    <br />
    Thus :<br />
    1.) Create the banner file<br />
    2.) Insert the Banner-line into the sshd config file<br />
    3.) ps -ef | grep sshd<br />
    4.) kill -HUP <<sshd PID>><br />
    <br />
    It should work from then on.
  • Gravatar - Neriencorce
    Neriencorce 19:32, May 24, 2011
    <a href=http://es5.com><img>http://www.seo.com/wp-content/themes/seo-v2/images/banner_search_guy_left.png</img></a>

    Hey Everybody <a href=http://blackhatworld.com><img>http://www.es5.com/images/blackhat.gif</img></a>

    I'm hunting for a <a href=http://www.es5.com/xrumer-hrefer/><b> Whitehat</b></a> tools to escalate my rankings. I'd acknowledge virtually any kind of Search Optimization and Web Site exposure

    If you know an individual adequate to guide targeted web traffic and with <a href=http://www.es5.com><b>Blackhat</a></b> SEO. I want to study to promote and exploit for online websites & products.

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2017 WebHostGear.com