I want to know the MAC address of a machine that I don't have access to at the moment. However, I have a known_hosts file from ssh with a valid entry, and given that I get warnings about changing MAC addresses I presume that this address is stored somewhere by ssh. Is there a way to display this saved MAC address?
Asked
Active
Viewed 7,387 times
2 Answers
5
The MAC address is not stored in the known_hosts file. Take a look at the sshd man page.
Each line in these files contains the following fields: markers
(optional), hostnames, bits, exponent, modulus, comment. The fields are
separated by spaces.
ChrisInEdmonton
- 8,796
3
I think you're mistaking it for a fingerprint. The SSH Fingerprint is supposed to be unique to each installation, and that key gets saved when you connect to a remote system. See this question and its answers for more information.
If you know the IP address, and it's on your network, you can ping the server, then run an arp -a | grep <IPA.ddr.e.ss> (without the <> signs), and get the MAC address that way.
Canadian Luke
- 24,640