Page 2 of 2

Re: SSH to a local Raspberry Pi

Posted: Fri Aug 14, 2020 6:03 am
by GlowInTheDark
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?

Re: SSH to a local Raspberry Pi

Posted: Fri Aug 14, 2020 8:10 am
by DougieLawson
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;

Re: SSH to a local Raspberry Pi

Posted: Fri Aug 14, 2020 11:56 pm
by LogicalUnit
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

Re: SSH to a local Raspberry Pi

Posted: Fri Aug 14, 2020 11:56 pm
by LogicalUnit
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.

Re: SSH to a local Raspberry Pi

Posted: Sat Aug 15, 2020 12:04 am
by DougieLawson
Give each machine a unique hostname and your problem will vanish.

Re: SSH to a local Raspberry Pi

Posted: Sat Aug 15, 2020 10:29 am
by GlowInTheDark
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.

Re: SSH to a local Raspberry Pi

Posted: Sat Aug 15, 2020 10:40 am
by rpdom
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.

Re: SSH to a local Raspberry Pi

Posted: Sat Aug 15, 2020 10:47 am
by DougieLawson
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.

Re: SSH to a local Raspberry Pi

Posted: Sat Aug 15, 2020 11:24 am
by GlowInTheDark
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.

Re: SSH to a local Raspberry Pi

Posted: Sun Aug 16, 2020 2:27 am
by LogicalUnit
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 :)