I have a strange problem since I get connection in both cases but the password doesn't work in one case. I can log in using ssh via LAN. I've looked at /var/log/auth.log but it doesn't contain anything about the failed login-attempts. I've also created a new user, mobil, that cannot use sudo -- user pi did also have wrong password from WAN but not from LAN. I get IP-number for the RasPi via DHCP but it always gets the same IP-number. (I have one other problem that is perhaps related: when I start aptitude without sudo and I want to install something it asks for the password but says it's the wrong password.)
When I try it from the outside I get the login prompt but it says:
$ ssh mobil@nnn.nnn.nnn.nnn
mobil@nnn.nnn.nnn.nnn's password:
Permission denied, please try again.
mobil@nnn.nnn.nnn.nnn's password:
Permission denied, please try again.
mobil@nnn.nnn.nnn.nnn's password:
Permission denied (publickey,password).
Here I login from LAN:
$ ssh mobil@192.168.1.nnn
mobil@192.168.1.nnn's password:
Linux aeblapi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Mar 31 20:43:34 2014 from lenovo3000.lan