Shady verizon fios DNS name coming up in ssh keys

2

While I was adding my public ssh key to my server I noticed that .fios-router.home comes up at the end of my key file. Where your computer name is. Why does it do this?

Operating system = (Mac OS) SSH client = (Mac OS default)

SomethingsGottaGive

Posted 2018-06-22T14:53:37.997

Reputation: 133

It does not resolve. Why does my domain showup in my ssh file? – SomethingsGottaGive – 2018-06-22T16:36:41.847

I am using mac os with the default ssh client. I have only encountered this on macos – SomethingsGottaGive – 2018-06-22T17:49:59.967

Answers

2

Because your computer thinks that that <hostname>.fios-router.home is the fully qualified domain name for the system. Most likely, the DHCP server on your router is handing out .fios-router.home as the DNS domain name in a DHCP option. There may be other ways that your particular system ends up thinking this though (my first guess if it's not a DHCP option is something to do with mDNS, macOS tends to be a bit overzealous about trusting info from mDNS in my experience).

That bit in question (the final part of the SSH key info, after the second space) is actually just a comment associated with the key. In essence, it's there to provide some user visible identifier to let you keep track of the key. Different SSH clients put different info there by default when generating keys, though most UNIX-based SSH clients follow the OpenSSH convention of putting the user and host where the key was generated there.

You can manually override the comment field during key generation on OpenSSH (the implementation macOS uses by default) with the -C option to ssh-keygen. The following should work to generate a key of the default type with just the system host name and your user name:

ssh-keygen -C "${USER}@$(hostname)"

Austin Hemmelgarn

Posted 2018-06-22T14:53:37.997

Reputation: 4 345