Unix method:
$ cd /etc/ssh/ or /opt/ssh/etc
$ vi ssh-banner
Type in the Warning message you want such as the one below, then save the file.
$ vi ssh-banner
Type in the Warning message you want such as the one below, then save the file.
******************************************************************************
IT IS AN OFFENSE
TO CONTINUE WITHOUT AUTHORIZATION.
This system is
restricted to authorized employees.
unauthorized access will be prosecuted. If unauthorized, close
access now!
unauthorized access will be prosecuted. If unauthorized, close
access now!
*******************************************************************************
After creating the banner file, edit the ssh configuration file
$ vi sshd_config
Look for the part below on sshd_config
# no default banner path
#Banner /path/banner file
And change it to
# no default banner path
Banner /etc/ssh/ssh-banner or /opt/ssh/etc/ssh-banner
Save the file then restart SSH
$ /etc/init.d/ssh restart or
$ vi sshd_config
Look for the part below on sshd_config
# no default banner path
#Banner /path/banner file
And change it to
# no default banner path
Banner /etc/ssh/ssh-banner or /opt/ssh/etc/ssh-banner
Save the file then restart SSH
$ /etc/init.d/ssh restart or
HP UX => # /sbin/init.d/secsh
stop and
# /sbin/init.d/secsh start
SOLARIS => # svcadm restart
network/ssh
Linux method:
First off login to our server as root.
Then type in the following:
vi /etc/motd
Now type in the security login message you
wish all users to see once they login to your server through SSH.
Type this message:
******************************************************************************
IT IS AN OFFENSE
TO CONTINUE WITHOUT AUTHORIZATION.
This system is
restricted to authorized employees.
unauthorized access will be prosecuted. If unauthorized, close
access now!
unauthorized access will be prosecuted. If unauthorized, close
access now!
*******************************************************************************
After juste type Esc : x! and Enter.
Logout of SSH then log back in, you will receive your new message!
No comments:
Post a Comment