AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 02:52 AM

    Originally posted by: the_smit


    When I am trying to telnet my AIX server using port 22, the version of openssh is always being shown.
    How can I change this to something like "Welcome User"

    $ telnet 196.61.200.60 22
    Trying...
    Connected to 196.61.200.60.
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.2 <-- I want to get change this.
    I already edited my /etc/motd file as well as my /etc/ssh/sshd_config but to no avail.
    TIA!
    #AIX-Forum


  • 2.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 03:52 AM

    Originally posted by: hdkutz


    Hello,
    enable motd in /etc/ssh/sshd_config displays the motd-File when User ssh's to that machine.
    To change opennsh to your desire you had to change the Source-Code.

    Cheers,
    ku
    #AIX-Forum


  • 3.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 04:03 AM

    Originally posted by: the_smit


    How to change/edit the openSSH sourcecode?

    Here's my current version by the way

    1. lslpp -l | grep openssh
    openssh.base.client 5.0.0.5300 COMMITTED Open Secure Shell Commands
    openssh.base.server 5.0.0.5300 COMMITTED Open Secure Shell Server
    openssh.license 5.0.0.5300 COMMITTED Open Secure Shell License
    openssh.man.en_US 5.0.0.5300 COMMITTED Open Secure Shell
    openssh.msg.en_US 5.0.0.5300 COMMITTED Open Secure Shell Messages -
    openssh.base.client 5.0.0.5300 COMMITTED Open Secure Shell Commands
    openssh.base.server 5.0.0.5300 COMMITTED Open Secure Shell Server
    #AIX-Forum


  • 4.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 04:35 AM

    Originally posted by: hdkutz


    Hello,
    you have to do it by your own.
    Download the Source Code for Openssh
    http://openssh.org
    Download the required Packages as well.
    Find your Codeline in the Source Code.
    Edit the Source code for your needs.
    Compile.
    Install.
    On openssh.org you will good Docs on how to do this.
    As you see - a lot of work to do.

    Why is it so important for you to hide which openssh Version you are using?

    Cheers,
    ku
    #AIX-Forum


  • 5.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 07:08 PM

    Originally posted by: SystemAdmin


    The source code come with a file name "version", in this file you can edit the banner, then compile and install it, that's all..

    cheers
    #AIX-Forum


  • 6.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 19, 2010 09:27 PM

    Originally posted by: the_smit


    Okay thanks!

    This is part of our server security assessment to change the OpenSSH banner. This way it would be difficult for attackers to know what version of OpenSSH our server is using.
    #AIX-Forum


  • 7.  Re: How to change openssh banner in telnet port 22

    Posted Thu July 22, 2010 04:29 AM

    Originally posted by: SystemAdmin


    why would you even allow attackers to access your ssh port in first place? hint: firewall? O.o
    #AIX-Forum


  • 8.  Re: How to change openssh banner in telnet port 22

    Posted Mon July 26, 2010 12:54 AM

    Originally posted by: SystemAdmin


    To change the message, which displays after the login prompt but before the password, edit your /etc/ssh/sshd_config and add a banner line; e.g.

    Banner /etc/herald

    This banner will display for both ssh and sftp.

    You may be advised NOT to use the word "welcome" in a banner, as there has been a legal precedent where a hacker was let off, when a site used a banner which "welcomed" his connection. A message stating that the site is for authorised users only, would be a more informed choice.

    You may wish to add a further legal warning in /etc/motd. I would suggest you limit the /etc/motd warning to 75 characters wide, so that it will be legible in both a terminal session and an ftp connection.
    #AIX-Forum


  • 9.  Re: How to change openssh banner in telnet port 22

    Posted Fri July 06, 2012 11:29 AM

    Originally posted by: NidhinSR


    Hi Guys, can any one shed some lights to this issue. The telnet output shows a different version which checks some openssh banner. The /etc/motd file or any banner file which is set in /etc/ssh/sshd_config "banner =" will not workout for this. Is there any way to change this without editing the source code.

    Any help would be appreciated. Thanks in advance.
    #AIX-Forum