Skip to content

Automatically SSH into your device using its MAC address, rather than IP address.

License

Notifications You must be signed in to change notification settings

tkmarsh/AutoSSH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

AutoSSH

A simple bash script to automatically ssh into your devices, using a MAC address instead of an IP.

There are two methods used in this script to achieve this:

  • Standard method checks the ARP cache for an IP associated with the devices MAC address.

  • Root method uses Nmap to scan all devices on local network to find the IP associated with the provided MAC address.

Executing with no flags runs the script with the default values.

-m is used to specify a MAC address.

-l is used to specify a username for login.

-n is used to search for the IP using Nmap (Requires root).

-n is slower and requies root to run, but is needed if the ARP cache doesn't contain the IP.

Designed for Debian, so results may vary between distros.

Sudo is required to run the nmap scan.

chmod +x and cp/mv the script into /usr/bin for easy access.

You can find the MAC address of the devices ethernet and wifi interfaces by locally running ifconfig and checking the HWaddr field.

About

Automatically SSH into your device using its MAC address, rather than IP address.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages