Displaying a warning banner prior to SSH login

book

Article ID: 168100

calendar_today

Updated On:

Products

XOS

Issue/Introduction

Describes how to add a warning banner that displays prior to the log-in screen when connecting via SSH.This article describes how to add a warning banner that displays prior to the log-in screen when connecting to the CPM via SSH.

Cause

Goal: Provide instructions to add a warning message in the banner for SSH login connections.

Resolution

To add a warning message for SSH connections

1.  Edit the file /etc/issue.net to add a warning message for network access.

2.  To display the warning message when connecting to the CPM using SSH, add the following line to /etc/ssh/sshd_config:
Banner /etc/issue.net

Note: The file /etc/issue contains a generic banner. This file is specific to console access.

For ssh, the file “sshd_config” should be updated in a couple of different places, for this to be persistent with reboots.

/etc/ssh/
/cbconfig/conf/etc/running-config/
/cbconfig/conf/etc/saved-config/

3. Then “sshd” process needs to be restarted for it to take effect using the command (while in unix shell on CPM):

service sshd restart

Workaround

N/A