Join the community today
Register Now

SSH Session Notice (above CMM Menu)

Discussion in 'System Administration' started by Jimmy, Mar 7, 2019.

  1. Jimmy

    Jimmy Premium Member Premium Member

    1,553
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +796
    Local Time:
    12:35 AM
    1.15.x
    MariaDB 10.3.x
    1. Edit the sshd_config file to activate the banner.
    Code:
    nano /etc/ssh/sshd_config
    > Find #Banner (at the bottom)

    Change to:

    > Banner /etc/myAwesomeBanner

    2. Create the banner:
    Code:
    nano /etc/myAwesomeBanner
    Add what you want to your banner! (see options below)

    3. Logout or reboot to see the changes.

    Have fun!

    SecurityTrails | Mitigating SSH based attacks – Top 15 Best SSH Security Practices

     
    • Like Like x 1
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    40,342
    8,931
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,755
    Local Time:
    2:35 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Nice though will/may conflict with MOTD that Centmin Mod by default uses too.
     
  3. Jimmy

    Jimmy Premium Member Premium Member

    1,553
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +796
    Local Time:
    12:35 AM
    1.15.x
    MariaDB 10.3.x
    I haven't had any conflicts yet with my server, though I guess every one's setup is different.
     
  4. fabianski

    fabianski Member

    74
    7
    8
    Feb 20, 2019
    Brazil
    Ratings:
    +22
    Local Time:
    1:35 AM
    I have the root user disabled and I use another user to administer it, but with it I do not receive the initial message (the one that shows if there are updates, last login, etc) when I connect to the ssh that I received with the root user.

    Is it possible to add it to other users as well?
     
  5. eva2000

    eva2000 Administrator Staff Member

    40,342
    8,931
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,755
    Local Time:
    2:35 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Right now it's only for the root user as Centmin Mod expects the actual root user is managing the server so some of the update/alert notifications are using routines which require root user privileges which a non-root user wouldn't have on initial login.
     
    • Like Like x 1
  6. fabianski

    fabianski Member

    74
    7
    8
    Feb 20, 2019
    Brazil
    Ratings:
    +22
    Local Time:
    1:35 AM
    even if another user has root permissions?
     
  7. eva2000

    eva2000 Administrator Staff Member

    40,342
    8,931
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,755
    Local Time:
    2:35 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Right now yes.
     
    • Like Like x 1
..