How to enable ssh warning banner in Ubuntu 12.04

For legal reasons, Some people need to display a warning banner on their Ubuntu machine before login so that a person requires to acknowledge the contents of the banner before entering the password. To do this, defines a text file location in sshd_config file which contains the warning messages.

Open /etc/ssh/sshd_config file:

sudo nano /etc/ssh/sshd_config

Locate the line, that contains Banner and uncomment it as given below:

Banner /etc/issue

Edit the /etc/issue file for adding the banner:

sudo nano /etc/issue

Here is mine banner as a sample, you can add your’s here:

###############################################################
#               Authorized access only!                       # 
# Disconnect IMMEDIATELY if you are not an authorized user!!! #
#       All actions Will be monitored and recorded            #
###############################################################

Restart the ssh service:

sudo service ssh restart

Now, If we try to login, it will show us the warning banner that we just configured:

Please note that this feature may not work with third party ssh client such as Putty.

Enjoy

Advertisements
Posted in Linux
One comment on “How to enable ssh warning banner in Ubuntu 12.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: