haakonnessjoen / MAC-Telnet

Open source MAC Telnet client and server for connecting to Mikrotik RouterOS routers and Posix devices using MAC addresses
http://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/
GNU General Public License v2.0
391 stars 125 forks source link

feature request -- pass commands #25

Open ODINITE opened 7 years ago

ODINITE commented 7 years ago

I would love to be able to execute commands from a remote shell.

Currently (if i have an IP address, assume default config) I could execute something like: ssh admin@www.xxx.yyy.zzz '/system reboot'

would it possible to implement this with the mac address? mactelnet 00:11:22:AA;BB;CC -u admin -p "" '/system reboot'

Thanks!

togish commented 1 week ago

I am also quite interested in this functionality. Currently working on a project regarding automated configuration of MikroTik routers and AP's running RouterOS.

The setup i am running are intended to be a first stage loading using MAC-telnet for an absolute basic setup on the device for further configuration using Terraform.

The MAC-telnet part are intended to take care of: initial IP assignment for L3 connectivity over API, creating a deployment account and installing certificates for secure connection to the API. The Terraform part, are responsible for the rest of the configuration, allowing an IaC approac for configuration of the devices.

Currently I am experimenting using "expect" for simulating the manual interraction with the device over MAC-telnet, but using standart input or a file reference would be preffered, as it is way more simple to work with and requires fewer dependencies when using MAC-telnet in an automated context.

I'd like to know what it will require for this functionality to become a reality.