Can i obtain the --- MAC ADDRESS --- of a remote host??
is there some way to know the mac address of a host that is at my network ??
can i know my mac address?? i use SLACKWARE i want to accept conections ... by ssh using the mac addres ... of the host... not ip .. |
You can use the arp command for mac addresses.
However I'd say you have a bad idea there. If the other side's NIC goes bad and the MAC is NIC specific (which it usually is but not always) then they'd no longer be able to communicate with you when they replaced the failed NIC wih a working one. Not only that its not likely to help you anyway as ssh relies mainly on the key - the IP is just a way to know where it goes or comes from - in fact if you leave out the IP/hostname in your authorized_hosts it will still work because it only cares about the key. |
how use arp??
i used arp | less
but only displays 2 host that i dont care.. how can i know the mac adres for example of a host that names servertest 10.41.0.146 |
Code:
# nmap -v <host> | grep "MAC Address" Code:
$ ssh <[user@]host> ifconfig | grep HWaddr | awk '{print $1": "$5}' |
sorry i dont have ssh acces .... and i maked
Quote:
is there another way to know the MAC ADDRESS of a remote host... and why when i make ARP | LESS only showsme 2 host tha are in my lan. and doesnt all the host in my lan? |
arp - ip and corresponding MAC address
nmap - port scanner |
We need to know where this box is first. For most use, you need to be on the same lan segment.
If on same lan then ping ip address. OK if it fails usually. Then run arp -a command. Not sure ssh by mac would be anymore secure. We have to configure some devices once in a while. I don't like to play with the book way so I just make a static arp entry for the device so that it is within my subnet. Then I can access it via the ip address that I created in static arp. Be sure to remove or know about that static entry. It can be a bugger to fix if forgotten. |
All times are GMT -5. The time now is 10:54 AM. |