mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 6:01 pm

Hi,
i cannot connect my raspberry with ssh pi@XXXX.local by my macbook pro
I have back this message:
"ssh: Could not resolve hostname gmvpi.local: nodename nor servname provided, or not known"
I found by google a lot of solution without success.
Can you gel me?

thanks

User avatar
DeeJay
Posts: 2026
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 6:08 pm

Can you connect if you try the connection with

Code: Select all

ssh pi@ip.address.of.rpi
(substituting the numeric IP address of your RPi of course)

Maybe your RPi is not configuring the DNS entry in your home router to allow the mac to look up its .local name
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 9:17 pm

Thanks Deejay,
with ip number all is ok!

But I would use if possible the host name.
Any suggestion?

User avatar
DeeJay
Posts: 2026
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 9:33 pm

Here are 2 websites that claim to have solutions. I have not tried them.

http://www.howtogeek.com/167190/how-and ... pberry-pi/

http://zackeryfretty.com/posts/assignin ... ip-address
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 9:35 pm

mnp55 wrote:Thanks Deejay,
with ip number all is ok!

But I would use if possible the host name.
Any suggestion?
Try running the avahi daemon on your RPi? It's the mDNS/Bonjour server that lets your Mac see your pi as http://hostname.local and ssh pi@hostname.local.

sudo apt-get install avahi-daemon
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 10:08 pm

Retanks,
I tried both link suggestion doesn't work.
When I try to ssh or web browser by win machine everything is ok.
I cannot use hostname.local just by my mac ....

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 10:09 pm

..... I have installed and running avahi ...

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 10:18 pm

Log on to your pi (using it's IP addr)
Then use:

Code: Select all

avahi-browse --all
to see your active avahi configuration. Close that program with CTRL+C.
And use

Code: Select all

avahi-resolve --address w.x.y.z # your RPi IP addr
to be sure it can resolve it.

On your Mac try ping w.x.y.z and ping pihostname.local # using the results from avahi-resolve.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 11:06 pm

Tankyou for answer when I try "avahi-browse --all"

I have the answer "-bash: avahi-browse: command not found"
....

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Problem with ssh pi@XXXX.local

Wed Nov 20, 2013 11:39 pm

mnp55 wrote:Tankyou for answer when I try "avahi-browse --all"

I have the answer "-bash: avahi-browse: command not found"
....
Ah, sudo apt-get install avahi-utils should fix that.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Thu Nov 21, 2013 1:46 am

ok, thanks

avahi services installed and run :
pi@gmvpi ~ $ avahi-browse --all
+ eth0 IPv4 gmvpi Remote Disk Management local
+ eth0 IPv4 gmvpi SSH Remote Terminal local
+ eth0 IPv4 gmvpi _device-info._tcp local
+ eth0 IPv4 gmvpi Apple File Sharing local
+ eth0 IPv4 gmvpi [b8:27:eb:ea:80:9f] Workstation local
^CGot SIGINT, quitting.
pi@gmvpi ~ $ avahi-resolve --address 192.168.1.20
192.168.1.20 gmvpi.local
pi@gmvpi ~ $

ssh pi@hostname.local

gmvmac$ ssh pi@gmvpi.local
ssh: Could not resolve hostname gmvpi.local: nodename nor servname provided, or not known
and i cannot ping ...

any other suggestion will be appreciated ..

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Thu Nov 21, 2013 6:25 pm

... update ...

in my finder i can see raspberry as hostname and access it.

It just in ssh and in web browser that hostname cannot be solved

...

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 1:41 am

mnp55 wrote:... update ...

in my finder i can see raspberry as hostname and access it.

It just in ssh and in web browser that hostname cannot be solved

...
ssh pi@gmvpi.local
and http://gmvpi.local (assuming you're running a web server)
should both work

can you ping gmvmac.local?

To see what services are running

Code: Select all

netstat -tan
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 1:02 pm

Dougie thank for answer.
My system:

Raspberry pi --- Ip 192.168.1.20 hostname gmvpi
Mac Book Pro --- Ip 192.168.1.21 hostname macbookvescovi3.workgroup

On Mac
I can ping Raspberry by Ip
I see Rasberry hostname in shared of finder, and I can access to files
I can Sftp://gmvpi
I can http://192.168.1.20
I cannot ping pi@gmvpi.local
I cannot http://gmvpi.local
I cannot sftp://gmvpi.local

Running netstat -tan on Raspberry (by terminal on Mac)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:4700 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:548 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 320 192.168.1.20:22 192.168.1.21:52703 ESTABLISHED

Running netstat -tan on Macbook pro
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.1.21.52785 10.132.220.10.25 SYN_SENT
tcp4 0 0 192.168.1.21.52703 192.168.1.20.22 ESTABLISHED
tcp4 0 0 192.168.1.21.52115 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52113 108.160.162.110.80 ESTABLISHED
tcp4 0 0 192.168.1.21.52111 17.172.34.29.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52106 173.194.67.109.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52105 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52101 173.194.67.108.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52099 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52098 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52096 173.194.78.108.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52095 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52094 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52091 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52090 173.194.78.108.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52089 176.31.116.114.143 ESTABLISHED
tcp4 0 0 192.168.1.21.52088 17.172.208.200.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52087 17.172.34.116.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52085 17.172.34.111.993 ESTABLISHED
tcp4 0 0 192.168.1.21.52060 64.4.46.41.443 ESTABLISHED
tcp4 0 0 192.168.1.21.52056 91.190.218.61.12350 ESTABLISHED
tcp4 0 0 192.168.1.21.52055 198.252.206.25.443 ESTABLISHED
tcp4 0 0 192.168.1.21.52025 213.199.179.174.40026 ESTABLISHED
tcp4 0 0 *.29535 *.* LISTEN
tcp4 0 0 192.168.1.21.52019 17.130.254.35.5223 ESTABLISHED
tcp4 0 0 *.44704 *.* LISTEN
tcp4 0 0 127.0.0.1.26165 127.0.0.1.63174 ESTABLISHED
tcp4 0 0 127.0.0.1.63174 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.63172 ESTABLISHED
tcp4 0 0 127.0.0.1.63172 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.63169 ESTABLISHED
tcp4 0 0 127.0.0.1.63169 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.63168 ESTABLISHED
tcp4 0 0 127.0.0.1.63168 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.63167 ESTABLISHED
tcp4 0 0 127.0.0.1.63167 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.62872 ESTABLISHED
tcp4 0 0 127.0.0.1.62872 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.55337 ESTABLISHED
tcp4 0 0 127.0.0.1.55337 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.55308 ESTABLISHED
tcp4 0 0 127.0.0.1.55308 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.55306 ESTABLISHED
tcp4 0 0 127.0.0.1.55306 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 127.0.0.1.26165 127.0.0.1.55305 ESTABLISHED
tcp4 0 0 127.0.0.1.55305 127.0.0.1.26165 ESTABLISHED
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 127.0.0.1.26165 *.* LISTEN
tcp4 0 0 *.17500 *.* LISTEN
tcp4 0 0 127.0.0.1.9423 *.* LISTEN
tcp4 0 0 127.0.0.1.9422 *.* LISTEN
tcp4 0 0 127.0.0.1.9421 *.* LISTEN
tcp46 0 0 *.3283 *.* LISTEN
tcp4 0 0 *.631 *.* LISTEN
tcp6 0 0 *.631 *.* LISTEN
tcp4 0 0 *.3580 *.* LISTEN
tcp4 0 0 *.88 *.* LISTEN
tcp6 0 0 *.88 *.* LISTEN
tcp4 0 0 *.* *.* CLOSED
tcp46 0 0 *.80 *.* LISTEN
tcp46 0 0 *.49152 *.* LISTEN
tcp4 0 0 127.0.0.1.631 *.* LISTEN
tcp6 0 0 ::1.631 *.* LISTEN
tcp4 0 0 *.515 *.* LISTEN
tcp6 0 0 *.515 *.* LISTEN
tcp4 0 0 *.445 *.* LISTEN
tcp6 0 0 *.445 *.* LISTEN
tcp4 0 0 *.5900 *.* LISTEN
tcp6 0 0 *.5900 *.* LISTEN
tcp4 0 0 *.548 *.* LISTEN
tcp6 0 0 *.548 *.* LISTEN
udp4 0 0 *.29535 *.*
udp6 0 0 *.56376 *.*
udp4 0 0 *.56376 *.*
udp4 0 0 192.168.1.21.123 *.*
udp4 0 0 *.59990 *.*
udp6 0 0 *.59715 *.*
udp4 0 0 *.59715 *.*
udp6 0 0 *.49899 *.*
udp4 0 0 *.49899 *.*
udp6 0 0 *.55609 *.*
udp4 0 0 *.55609 *.*
udp6 0 0 *.59401 *.*
udp4 0 0 *.59401 *.*
udp6 0 0 *.54804 *.*
udp4 0 0 *.54804 *.*
udp6 0 0 *.65053 *.*
udp4 0 0 *.65053 *.*
udp4 0 0 *.* *.*
udp4 0 0 127.0.0.1.53790 *.*
udp6 0 0 fe80::fa1e:dfff:.123 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.17500 *.*
udp4 0 0 127.0.0.1.50148 *.*
udp4 0 0 127.0.0.1.49875 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.3283 *.*
udp46 0 0 *.3283 *.*
udp4 0 0 *.* *.*
udp6 0 0 fe80::1%lo0.123 *.*
udp4 0 0 127.0.0.1.123 *.*
udp6 0 0 ::1.123 *.*
udp6 0 0 *.123 *.*
udp4 0 0 *.123 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp46 0 0 *.* *.*
udp4 0 0 *.88 *.*
udp6 0 0 *.88 *.*
udp4 0 0 *.* *.*
udp6 0 0 *.5353 *.*
udp4 0 0 *.5353 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.138 *.*
udp4 0 0 *.137 *.*
udp4 0 0 127.0.0.1.60762 *.*
icm6 0 0 *.* *.*

The problem is ssh pi@gmvpi.local and http://gmvpi.local
any suggestion ...

FinnAnder
Posts: 13
Joined: Sun Jul 21, 2013 4:50 pm
Contact: Website

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 9:36 pm

Try ssh pi@gvmpi.workgroup
I've a feeling it's because your Mac is .local
Also, try editing /etc/hostname and see if that's the correct host, if it isn't, then change it, write it out and then reboot.
Hope this helps!
--
finnian@fxapi.co.uk
fxapi.co.uk

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 10:21 pm

also this not work:

macbookvescovi3:~ gmvmac$ ssh pi@gmvpi.workgroup
ssh: Could not resolve hostname gmvpi.workgroup: nodename nor servname provided, or not known

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 10:31 pm

PROBLEM SOLVED!!
thanks to DeeJay, Dougie, Finn.
In my macbook pro
system preference --> Network --> Advanced --> DNS I changed in domain from "Workgroup" to "local"
now i can ping Raspberry as pi@gmvpi.workgroup and
http://gmvpi.workgroup it's ok also!!
also in ftp as gmvpi.workgroup it's ok

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Problem with ssh pi@XXXX.local

Fri Nov 22, 2013 10:37 pm

mnp55 wrote:PROBLEM SOLVED!!
thanks to DeeJay, Dougie, Finn.
In my macbook pro
system preference --> Network --> Advanced --> DNS I changed in domain from "Workgroup" to "local"
now i can ping Raspberry as pi@gmvpi.workgroup and
http://gmvpi.workgroup it's ok also!!
also in ftp as gmvpi.workgroup it's ok
So the problem wasn't the RPi. The problem was in OSX. Am I surprised? :mrgreen:
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mnp55
Posts: 13
Joined: Wed Nov 20, 2013 5:56 pm

Re: Problem with ssh pi@XXXX.local

Sat Nov 23, 2013 2:01 pm

yes is in osx.
I have erratic behavior ....
so:
some time i can ping gmvpi.workgroup
other time just gmvpi.
never gmvpi.local
the only constant is ping raspberry directly with its ip

FinnAnder
Posts: 13
Joined: Sun Jul 21, 2013 4:50 pm
Contact: Website

Re: Problem with ssh pi@XXXX.local

Mon Dec 16, 2013 10:04 pm

Glad you got it working!
--
finnian@fxapi.co.uk
fxapi.co.uk

RocketRancher
Posts: 1
Joined: Wed Aug 10, 2016 10:42 pm

Re: Problem with ssh pi@XXXX.local

Wed Aug 10, 2016 11:04 pm

Actually there's no problem with OSx.
In the Pi, edit /etc/resolvconf.conf and de-comment "home"

Return to “Troubleshooting”