You are here: Home Tech Notes Linux Ubuntu: SSH - Change Welcome Message
Ubuntu: SSH - Change Welcome Message PDF Print E-mail
User Rating: / 0
PoorBest 
Tech Notes - Linux
Written by Rick   
Wednesday, 24 June 2009 00:00

Have you ever tired of seeing the standard SSH welcome message (a.k.a. banner)? Does it provide too much information about the system creating a security concern? If your answer to either of these questions is "Yes", then read on.

Changing the message is relatively easy. Simply modify motd. The file is located in /var/run on my system. Other information I've found suggests the file is located in /etc. I do have a shortcut from /etc to the file in /var/run so either location may be valid depending upon your release version of Ubuntu.

If you also wish to remove the "Last Login" information line, you 'll need to modify one other file (though not recommended). Edit /etc/ssh/sshd_conf. Locate and change the line "PrintLastLog yes" to "PrintLastLog no". Restart the ssh daemon (sudo /etc/init.d/ssh restart).

 

Comments (3)
  • Stephen McConnell  - This doesn't work
    avatar

    Each time I change it and re-log in, motd overwrites the message with another message... When I go back to the motd file, it has the same old message.

    Stephen McConnell

  • Rick
    avatar

    Stephen you are correct. Changes have occurred since this article was posted.

    The stock motd system can be altered in Ubuntu 9.10 by;
    1) delete the symlink /etc/motd.
    2) create a new file: sudo touch /etc/motd
    3) modify /etc/motd to say what ever you like.

    You may want to look into the update-motd package to make your Message of the Day dynamic.

  • Kiel McGonegal
    avatar

    Thank you so much Rick Ive been looking everywhere!!

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.