Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

changing SSH password prompt

Discussion in 'General Linux' started by yezrach, Feb 12, 2013.

  1. yezrach

    yezrach Guest


    I am trying to understand if i can modify and have ONLY the "password:" prompt to appear when ssh to my system.
    i tried to play with any env files (csh, tcsh, bash....) but i could not find where it might be configured.

    [root@msrv root]# ssh 0
    root@0's password:

    want it to be:
    [root@msrv root]# ssh 0

    current installed SSH rpms:


  2. hackinjack

    hackinjack Guest

    The only way to do this the way you ask is via downloading and modifying the source.

    However you could just display a banner with the hostname in before authentication. If you edit the /etc/ssh/sshd_config file, find the "Banner" directive. Remove the comment, then either change it to some file of your choice, or go and edit /etc/issue.net - which is the default Banner file.

    Once you have the banner text set up, restart the ssh daemon. The banner will now be displayed before the password prompt when users try to ssh in.

    Is that any use to you?
  3. yezrach

    yezrach Guest

    the banner wont help here, i already tried that:

    # ssh 0
    Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
    Kernel \r on an \m

    root@0's password: (it sill shows the next).

    is there a way to recompile the Password.pm file after modifying the relevant lines in it?

  4. lmolinuz

    lmolinuz Guest

    maybe is too late to help with it but... you don't need to recompile anything:

    with a text editor like nano or vi edit the config file /etc/ssh/sshd_config and look for the line:

    if the parameter is yes:
    ChallengeResponseAuthentication yes

    you'll have the password prompt just like this:
    $ ssh user@host
    password: _

    and if the parameter is no:
    ChallengeResponseAuthentication no

    then you'll have the password prompt just like this:
    $ ssh user@host
    user@host's password: _

    save changes and restart ssh daemon:
    # /etc/init.d/ssh restart

    Note: this lines worked fine at Debian 4.0 "Etch", 5.0 "Lenny" and 6.0 "Squeeze"...
    Good luck and have a nice day everyone!

Share This Page