warning: /etc/hosts.allow, line xx: host name/name mismatch

85

sshd is just giving you a warning that the denied connection is not listed in either hosts.allow or hosts.deny, this is part of the verbose logging behavior, allowing you to troubleshoot connections which might need to be matched, and aren't matching (usually due to to incorrectly configured DNS entries, especially RDNS entries).

Keeping an eye on warnings is never a bad idea though, although this is fairly innocuous.

Share:
85

Related videos on Youtube

Jonathan Prieto
Author by

Jonathan Prieto

Updated on September 18, 2022

Comments

  • Jonathan Prieto
    Jonathan Prieto almost 2 years

    I am using CLION in Mac OSX High Sierra, and when I compile, I have an error.

     cadena=static_cast<ostringstream*>(&(ostringstream()<<vidas))->str();
    

    and the error is:

    /Users/macbookpro-jonathanprieto/CLionProjects/xonixpacman/main.cpp:113:40: error: cannot take the address of an rvalue of type 'std::__1::basic_ostringstream, std::__1::allocator >' cadena=static_cast(&(ostringstream()<str();

    • molbdnilo
      molbdnilo over 6 years
      Well, you can't take the address of an rvalue. What exactly do you want to accomplish?
  • Nishanth
    Nishanth over 11 years
    my rdns/dns mapping is setup correctly, *.aliyun.com does not belong to me, its an attacker
  • NickW
    NickW over 11 years
    Looking into it further, it's basically saying that the connection does not respond to a line in either the hosts.allow, or in hosts.deny. You're doing verbose logging, which is useful to identify problems like the one I mentioned before.
  • NickW
    NickW over 11 years
    Furthermore, it's logging to allow you to see why a certain user is being denied (or not allowed) access. Obviously the connections that aren't being logged are already matching a line in one of the two files.
  • Nishanth
    Nishanth over 11 years
    My DSL dynamic IP/Hostname is not in hosts.allow too and it does not log any warning. I don't understand why sshd wants the attackers hostname to match my local hostname, this can't be
  • NickW
    NickW over 11 years
    There is the misunderstanding, it doesn't "want" anything, it is just trying to let you know that this connection came through, and was denied, but since the IP wasn't listed in either file, it might be something you want to change (you might be troubleshooting someone unable to connect). It's just a side effect of verbose logging.
  • Nishanth
    Nishanth over 11 years
    That might be it. Well many people ignore warnings in common but I really want to investigate them and understand. If you edit your answer I'm gonna accept it, tyvm.
  • NickW
    NickW over 11 years
    Certainly, it's good seeing people making sure they understand what the programs are logging.
  • Jonathan Prieto
    Jonathan Prieto over 6 years
    You put vidas as a word but I need it as a variable !
  • Gem Taylor
    Gem Taylor over 6 years
    Disaster! I didn't have a variable called vidas. :-) So change #std::string("vidas")# back to #vidas#