I have the exact same configuration. This answer pertains specifically to connecting to a raspberry pi from inside the local network (not outside). I have A raspberry pi ssh server, and a macbook pro, both connected to a a router. On a test router, my mac connects perfectly when I use ssh danran@mypiserver
, however, when I use ssh danran@mypiserver
on my main router, i get the error
ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
Just as you have gotten. It seems, the solution for me at least, was to add a .local
extension to the hostname when connecting from my mac via ssh.
So, to solve this, i used the command ssh [email protected]
(remember to replace the "danran" with your username and the "mypiserver" with your hostname) instead of using ssh danran@mypiserver
.
To anyone reading this, try adding a .local
as the suffix to your hostname you are trying to connect to. That should solve the issue on a local network.