LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-20-2006, 01:18 PM   #1
eder_michael11
Member
 
Registered: Jan 2006
Posts: 51

Rep: Reputation: 15
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 ..
 
Old 04-20-2006, 01:29 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 04-20-2006, 02:55 PM   #3
eder_michael11
Member
 
Registered: Jan 2006
Posts: 51

Original Poster
Rep: Reputation: 15
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
 
Old 04-20-2006, 04:45 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Code:
# nmap -v <host> | grep "MAC Address"
or if you have ssh access:
Code:
$ ssh <[user@]host> ifconfig | grep HWaddr | awk '{print $1": "$5}'

Last edited by bulliver; 04-20-2006 at 04:51 PM.
 
1 members found this post helpful.
Old 04-24-2006, 11:05 AM   #5
eder_michael11
Member
 
Registered: Jan 2006
Posts: 51

Original Poster
Rep: Reputation: 15
sorry i dont have ssh acces .... and i maked

Quote:
# nmap -v <host> | grep "MAC Address"
and doesnt shows MAC ADDRESS

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?
 
Old 08-18-2014, 07:32 AM   #6
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
arp - ip and corresponding MAC address
nmap - port scanner
 
Old 08-18-2014, 03:10 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to obtain mac address using sk_buff??? dogslayer Linux - Networking 2 04-14-2006 07:22 AM
Getting MAC address of remote Equipment eljofi Linux - Networking 1 04-11-2006 06:00 PM
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
iptables - blocking a host by MAC address retiem Linux - Security 6 08-29-2003 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration