GlowInTheDark
Posts: 744
Joined: Sat Nov 09, 2019 12:14 pm

Re: SSH to a local Raspberry Pi

Fri Aug 14, 2020 6:03 am

If you do not enable internet connection sharing with the USB ethernet adaptor interface, the Pi will have an address in the 169.254.x.x range and will have no internet access. If you do enable internet connection sharing, it will have an address in the range 192.168.137.x and you will be able to use the internet.
This is Windows you are talking about here, right?
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

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

Re: SSH to a local Raspberry Pi

Fri Aug 14, 2020 8:10 am

LogicalUnit wrote:
Fri Aug 14, 2020 3:17 am
DougieLawson wrote:
Mon Aug 10, 2020 12:54 pm
sudo apt install avahi-utils
Can you please tell me how to disable this on an RPi that I have configured with a static IP, and no longer want raspberrypi.local to resolve to its address?
Eh? I don't understand what you're asking.

If you don't want the (in some ways very useful) Bonjour configurationless networking then purge all of the avahi* packages with sudo apt purge avahi*;sudo apt autoremove;
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

LogicalUnit
Posts: 14
Joined: Thu Jan 03, 2013 9:01 am

Re: SSH to a local Raspberry Pi

Fri Aug 14, 2020 11:56 pm

GlowInTheDark wrote:
Fri Aug 14, 2020 6:03 am
If you do not enable internet connection sharing with the USB ethernet adaptor interface, the Pi will have an address in the 169.254.x.x range and will have no internet access. If you do enable internet connection sharing, it will have an address in the range 192.168.137.x and you will be able to use the internet.
This is Windows you are talking about here, right?
Yes, I'm working on Windows 10

LogicalUnit
Posts: 14
Joined: Thu Jan 03, 2013 9:01 am

Re: SSH to a local Raspberry Pi

Fri Aug 14, 2020 11:56 pm

DougieLawson wrote:
Fri Aug 14, 2020 8:10 am
LogicalUnit wrote:
Fri Aug 14, 2020 3:17 am
DougieLawson wrote:
Mon Aug 10, 2020 12:54 pm
sudo apt install avahi-utils
Can you please tell me how to disable this on an RPi that I have configured with a static IP, and no longer want raspberrypi.local to resolve to its address?
Eh? I don't understand what you're asking.

If you don't want the (in some ways very useful) Bonjour configurationless networking then purge all of the avahi* packages with sudo apt purge avahi*;sudo apt autoremove;
The issue is that I have multiple Raspberry Pis on the same network, and raspberrypi.local isn't resolving to the one I want.

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

Re: SSH to a local Raspberry Pi

Sat Aug 15, 2020 12:04 am

Give each machine a unique hostname and your problem will vanish.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

GlowInTheDark
Posts: 744
Joined: Sat Nov 09, 2019 12:14 pm

Re: SSH to a local Raspberry Pi

Sat Aug 15, 2020 10:29 am

Give each machine a unique hostname and your problem will vanish.
And note that (rhetorical) you should do this regardless of any specific problem or issue. Every machine on a network should have a unique hostname or all sorts of weird/bad things can/will happen.

This should be viewed as a matter of basic computer hygiene, and not as a fix to this specific problem.

And, of course, there is no reason at all to disable avahi.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: SSH to a local Raspberry Pi

Sat Aug 15, 2020 10:40 am

GlowInTheDark wrote:
Sat Aug 15, 2020 10:29 am
there is no reason at all to disable avahi.
Unless you don't need, or want it.

I have absolutely no need for it at all. My local DNS handles everything properly.
Unreadable squiggle

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

Re: SSH to a local Raspberry Pi

Sat Aug 15, 2020 10:47 am

GlowInTheDark wrote:
Sat Aug 15, 2020 10:29 am

And, of course, there is no reason at all to disable avahi.
Curiously (like CUPS) avahi (aka Bonjour) is one of the better things that Apple have developed*. For most home users being able to find their local devices with somehostname.local rather than 192.168.3.14 makes perfect sense to me. The only hard part is avoiding the overlap of hostnames.



* I can't comment on their computers, tablets and MP3 players, I've not used anything made by Apple since 1981.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

GlowInTheDark
Posts: 744
Joined: Sat Nov 09, 2019 12:14 pm

Re: SSH to a local Raspberry Pi

Sat Aug 15, 2020 11:24 am

Curiously (like CUPS) avahi (aka Bonjour) is one of the better things that Apple have developed*. For most home users being able to find their local devices with somehostname.local rather than 192.168.3.14 makes perfect sense to me.
I agree in principle (of course, given my previous post), but the one quibble I have with it (your assertion) is that it (avahi) overlaps functionality with (rhetorical) your router.

I.e., on my network, I can reference either:

1) machinename - which gets resolved by my router (to 192.168.whatever.whatever)

or

2) machinename.local - which (also) gets resolved (by avahi) (to 192.168.whatever.whatever)

Now, not all routers do this, but IME most well-configured ones do. So, I'm not saying that avahi isn't ever needed, but (again, IME), most of the time, it duplicates functionality of the router.

Anyway, regardless of all this, the point is that there's no reason for a newb to disable it.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

LogicalUnit
Posts: 14
Joined: Thu Jan 03, 2013 9:01 am

Re: SSH to a local Raspberry Pi

Sun Aug 16, 2020 2:27 am

DougieLawson wrote:
Sat Aug 15, 2020 12:04 am
Give each machine a unique hostname and your problem will vanish.
Thanks for this advice. I did a

Code: Select all

sudo raspi-config
and then went into Network Options => Hostname. I now have pi4.local and pi1.local which work great :)

Return to “Beginners”