SSHD banner

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

SSHD banner

Postby GI_James » Mon Jul 28, 2014 0:23

I'm looking to setup an SSHD banner. I have one that appears when a username is entered. I want one that appears at time of connection.

Code: Select all
********************
BANNER FOO BAR
********************
login:


instead of:
Code: Select all
login: billybob
password: ****************

********************
BANNER FOO BAR
WELCOME!!!!!!!
********************
James Strickland
Crestview, FL
StrickStuff.com
Computer
Screen
Keyboard
Wireless Mouse
Mouse Pad
User avatar
GI_James
Simple Hen
 
Posts: 61
Joined: Sun Mar 25, 2007 6:37
Location: Crestview, FL

Re: SSHD banner

Postby sabayonino » Mon Jul 28, 2014 12:33

edit /etc/ssh/sshd-banner file for your banner
and /etc/ssh/sshd_config
Code: Select all
# no default banner path
#Banner none

to
Code: Select all
# no default banner path
Banner /etc/ssh/sshd-banner




reload sshd daemon
Code: Select all
# systemctl restart sshd

(or ssh instead ... i don't remember)


PS : ops ... you want see banner after login

even in /etc/ssh/sshd_config

set
Code: Select all
PrintMotd no

to
Code: Select all
PrintMotd yes


and edit /etc/motd as your welcome banner

[PS : if you'll see double Welcome Banner , set PrintMotd no and keep /etc/motd only ]
User avatar
sabayonino
Sagely Hen
 
Posts: 2464
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: SSHD banner

Postby GI_James » Tue Jul 29, 2014 1:28

Already did the banner, but the MOTD doesn't show up first. The banner shows up after username is entered.
James Strickland
Crestview, FL
StrickStuff.com
Computer
Screen
Keyboard
Wireless Mouse
Mouse Pad
User avatar
GI_James
Simple Hen
 
Posts: 61
Joined: Sun Mar 25, 2007 6:37
Location: Crestview, FL

Re: SSHD banner

Postby sabayonino » Tue Jul 29, 2014 11:50

GI_James wrote:Already did the banner, but the MOTD doesn't show up first. The banner shows up after username is entered.


Setting /etc/ssh/sshd_config
Code: Select all
Banner /etc/ssh/<your_file_banner>


Show it First your login

Setting /etc/motd
Show "Welcome Banner" after your login



After every changes , reload sshd daemon/service
User avatar
sabayonino
Sagely Hen
 
Posts: 2464
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: SSHD banner

Postby GI_James » Wed Jul 30, 2014 0:44

After restart SSHD, MOTD shows up (I forgot to restart it before).

but, nothing shows up prior to username entry. Banner shows up after username entry, followed by MOTD after password entry.
James Strickland
Crestview, FL
StrickStuff.com
Computer
Screen
Keyboard
Wireless Mouse
Mouse Pad
User avatar
GI_James
Simple Hen
 
Posts: 61
Joined: Sun Mar 25, 2007 6:37
Location: Crestview, FL

Re: SSHD banner

Postby sabayonino » Wed Jul 30, 2014 20:12

I don't know.

for me it works

repeat

set /etc/ssh/<your_banner_file>

/etc/ssh/sshd_config
Code: Select all
    # no default banner path
Banner /etc/ssh/<your_banner_file>



reload ssh service
User avatar
sabayonino
Sagely Hen
 
Posts: 2464
Joined: Sun Sep 21, 2008 1:12
Location: Italy


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron