I am trying to get an SSH server running Ubuntu 10.04 to allow password logons only when coming from the local network. For all other users, especially those logging in from the internet via the firewall, I want to force Key based authentication. I googled around and found the following. 

Here's what I have changed in `/etc/ssh/sshd_config`:

```
PasswordAuthentication yes
Match Address 192.168.5.0/24
PasswordAuthentication yes

```

With that, I log in from another machine that has a 192.168.5. address, but it won't allow me in for lack of a publicKey:
Permission denied (publickey).