Zeroconf SSH advertising : utility?
5,504
When ssh is advertised via bonjour, you can ssh to the linux machine via "ssh hostname". No client side configuration is required is the server changes IP Address, or is using a non-standard port.
Bounjour advertised ssh servers show up automatically in OSX Terminal's File->New Remote Connection menu. In iTerm, the menu is Bookmarks -> Bonjour, or via Right click -> New -> Bonjour.
To enable this on linux (as the OP already has), install avahi, then your /etc/avahi/ssh.service should look like the following. It should be enabled as a boot service.
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
Links:
- Avahi daemon http://avahi.org/
- Gentoo avahi HOWTO http://en.gentoo-wiki.com/wiki/Avahi
Related videos on Youtube
Author by
Studer
Updated on September 17, 2022Comments
-
Studer almost 2 years
On my Airport Express I can set up SSH advertising for computers on my network.
I have the same option with avahi on a linux server.
What is the utility of doing this ?
-
Studer over 14 yearsThat's not what I want, it's already activated, but I want to know the utility of advertising SSh through Bonjour. How useful is it ?
-
user1686 over 14 yearsWhich SSH clients actually use such advertisements? Does generic OpenSSH support it?
-
Lee Hambley over 11 yearsFor what it's worth, if you are connecting from a mac, you'll have to ssh into
hostname.local
, I recommend adding an alias in~/.ssh/config
to avoid the extra typing. -
cde about 7 years@LeeHambley the Terminal option will automatically add the .local to it.
-
technogeek1995 almost 4 yearsIn the current version of iTerm, you have to go to settings to enable
General>Services>Add Bonjour to Profiles
. The advertised service will then show up as a profile in iTerm. You can access it viaProfiles>Bonjour
in the Mac OS menubar.