0
I have very limited (almost no) knowledge of how netcat works other than I've managed to get one Mac mini to listen on port 13370 [using nc -l 13370] (for TCP commands?) and I have a MacBook that has connected to the Mac mini using [nc 192.168.1.xxx 13370], and whatever I type in Terminal on the MacBook shows up (echoes?) on the Mac mini's Terminal.
I want to be able to tell the Mac mini to open a file (also stored on the Mac mini), from another device on the same LAN. So currently I'm using the MacBook, but ultimately I want to send commands from a home automation app that I am making, to for example play a video on the Mac mini which is connected to a TV screen. Or any other command that you could usually do in Terminal. My app cannot connect to the Mac mini using SSH which is why I'm trying this way.
What command would I need to send to open the file? IS there some format that I should use etc? Grateful for any help.
2You can [edit] your question anytime. – None – 2018-11-14T15:11:29.650
What is the reason that you cannot use SSH? Are you saying that you don't have access to SSH on one of the machines, or are you saying that your application can only send connections over a port? – DKing – 2018-11-14T15:36:27.900
The application cannot connect using SSH. I've been advised by the software maker to use netcat / telnet etc. Yes I think it can only communicate over a port – manaman – 2018-11-14T15:57:32.823
@manaman I have a script which uses netcat to do exactly this, but it's written in batch for Windows. Shouldn't take more than a few minutes to port it tho.
– rahuldottech – 2018-11-14T16:22:20.103Are you developing this application as your question says, or is there a manufacturer involved as your comment indicates? I am a bit confused as to why you're setting it up like this – bertieb – 2018-11-14T17:06:09.263
@bertieb I'm using software called DemoPad which does the compiling of the app once I've set all the commands and devices in the smart home project in the desktop program where the project is built. so I'm bound by the protocols that DemoPad allows. – manaman – 2018-11-14T22:38:28.180