SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Tuesday, December 18, 2007

Change SSH Welcome Banner on Ubuntu

Every time when u are connecting to Ubuntu machiens through ssh client, you receive the same message(default).If u want to change this welcome message then u have to edit some files in Your ubuntu machines

Here's the message that I get every time:

Linux aspx-desktop 2.6.15-28-386 #1 PREEMPT Tue Mar 13 20:49:31 UTC 2007 i686 GNU/Linux
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed

nthillaiarasu@aspx-desktop:~$

Changing this message requires editing two different files. The first three sections can be modified by editing the following file:

/etc/motd

This file contains the linux build number as well as the Ubuntu warranty message. I don't find this particularly useful, so I removed all of it and replaced it with my own message.


To disable the last login message (which I don't recommend doing), you will need to edit the following file in sudo mode:

/etc/ssh/sshd_config

Find this line in the file and change the yes to no as shown:

PrintLastLog no

Now when you login, you'll get a blank prompt, although I wouldn't necessarily recommend it because it's useful to see the last login to the system for security reasons. This is my prompt now:

Linux aspx-desktop 2.6.15-28-386 #1 PREEMPT Tue Mar 13 20:49:31 UTC 2007 i686 GNU/Linux

Welcome to NarineThillaiArasu's PC.........
###################################################################
# Please Use the resources as care as possible #
# #
###################################################################

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
You have new mail.
Last login: Tue Dec 18 18:10:17 2007

No comments :

Post a Comment