I have a problem with a remote sensor (connected via a raspberry), it is connected to a local router and correctly uses it as gateway. I can see that the raspberry got an ip address via dhcp. However, there is some configuration mismatch. The raspberry thinks it has a different ip address (probably known to me). Therefore I cannot ping it or ssh into it. Is there still a way to connect to it via ssh ?
If you know the IP address that the raspberry pi 'thinks' it has: and you have access to the router configuration. Configure the router to allocate the IP that the Pi thinks it has by DHCP fixed/static address to the Pi. That way both the router and the Pi agree what the address is. You should then be able to connect. (provided that there are no other network configuration issues: e.g. routing).