You are not logged in.

#1 2013-12-28 09:43:25

leomeloxp
Member
From: Jersey Island- UK
Registered: 2011-11-02
Posts: 13
Website

[SSH] Match Address inconsistent mask length

I have an SSH server running on my Arch which I use to connect remotely from mobile devices and computers.

I wanted to set it up in a way that while I'm on LAN I can use password auth, and when I'm out of my LAN it would only allow public key method. So what I did on my sshd.conf was:

# Authentication:
PasswordAuthentication no

Match Address 192.168.4.255/24
PasswordAuthentication yes

But then, after running sshd -d I always get:

...
debug1: attempt 0 failures 0 [preauth]
Inconsistent mask length for network "192.168.4.110/24"
reprocess config line 129: Bad Match condition

I also tried many "random" /xx mask lengths and got nothing.

My network is under a 192.168.4.1 router with DHCP addresses from *.109~*.150 (with some reserved IPs on lower numbers).

EDIT: In case it isn't clear, what I'd like to know is how to get rid of that error and make it work.

Please let me know if any more info is needed, and thanks in advance big_smile

Last edited by leomeloxp (2013-12-28 10:44:50)


The hardest arithmetic to master is that which enables us to count our blessings -- Eric Hoffer.

May the source be with you =]

Offline

#2 2013-12-28 17:53:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [SSH] Match Address inconsistent mask length

Have you tried 192.168.4.0/24  ??  It might be carping because you are setting bits in the least significant byte; even though you have said (with the /24) that those bits do not count.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB