Is it possible to connect remote system using mac-address?

Solution 1:

From commlineFu:

connect via ssh using mac address Instead of looking for the right ip address, just pick whatever address you like and set a static ip mapping.

sudo arp -s 192.168.1.200  00:35:cf:56:b2:2g temp && ssh [email protected]

Another command:

ssh root@`for ((i=1; i<=255; i++));do arp -a 192.168.1.$i; done | grep 00:35:cf:56:b2:2g | awk '{print $2}' | sed -e 's/(//' -e 's/)//'`

then all you have to change the MAC and choose any IP you wish to use and change root to a valid user

Note: Those commands is just a hack an in really they are using the IP itself not the MAC.

Example using second command:

My LAN IP range is 10.1.1.* .The MAC of server want to connect to is 00:15:17:5f:XX:XX . The user on the host machine is called maythux

So the command will be:

ssh maythux@`for ((i=1; i<=20; i++));do arp -a 10.1.1.$i; done | grep 00:15:17:5f:XX:XX | awk '{print $2}' | sed -e 's/(//' -e 's/)//'`

Note i make for loop to 20 just for timing and i already know ip is less than 20, in case you dont range so keep it to 255.

And boom I'm prompted for password of user maythux in the host pc


TIP:

Instead you can normally use SSH with using IP, if you don't know the IP of some systems you can get it from the MAC, take a look for my question List all MAC addresses and their associated IP addresses in my local network (LAN) , you'll find many answers how to get an IP knowing its MAC