It would be really beneficial to allow meshcmd to take an argument of a meshaction.txt file, that's not called "meshaction.txt". This would allow a user to retain a list of files and then set up (in my case) routes to remote servers without having to always copy them to a meshaction.txt file. At the moment I could easily have 100 files all dedicated to individual remote servers, but I have to run a utility that copies one of those files to overwrite meshaction.txt and then launches meshcmd. They'd be like RDP files within Windows.
At the moment:
./meshcmd route --password abcdef
looks for meshaction.txt and sets up the (route in this case)
What would be lovely:
./meshcmd serverA.txt
looks for serverA.txt which contains everything the meshaction.txt file would contain.
By the way, the penny dropped on me this evening with regards to the power of meshcmd. In prior issues that I've raised, I didn't understand that MCR is (probably?) a GUI version of meshcmd but that meshcmd is a cross platform control. I knew that MC2 was already assisting me greatly in being able to handle remote systems, but (being a Linux user) I believed that there was a void in not being able to grant Linux users the same power that Windows users have.
I obviously now stand very firmly corrected.
This evening I've been able to connect to my remote servers, using the SSH client that I want to use, as well as setting up MySQL workbench connections to their databases. Please advise the powers that be that this solution far exceeds anything else that's on the market, and permit me to congratulate them (and @Ylianst, @krayon007 et al) on putting the effort and resources in to make this a truly top notch solution.
And whilst I'm at it ... would the config file be able to set up multiples connections, with the idea of only running one instance of meshcmd but two (or more) maps are set up? When supporting our remote servers, we typically need SSH, MySQL, HTTP and HTTPS.
meshactionMultipleRoutes.txt
Even if one config file can't set up multiple maps, the idea behind #588 would allow multiple maps to be set up: each instance of meshcmd runs with their respective (independently named) config file.
The problem with your issues is that they are too good. Yes, your suggestion to specify a different "meshagent.txt" and many routes support are excellent. By the way, MeshCmd and MeshCentral Router and two different implementations (MeshCmd is not part of MeshCentral Router). Just letting you know because both will have different features, bugs, etc.
I will look into doing this. I just got to get multi-language support and the new meshagent out the door first.
Mate, I see how many issues / feature requests you have to deal with and frequently I hold back a little as I don't want to add to your woes, but - frankly - I love this software and I'm sure I'm only using a fraction of it's capabilities.
I just got to get multi-language support and the new meshagent out the door first.
Well, we don't want you getting bored now, do we? ;o)
Dave, Meshcentral routing protocol is actually simple. I have written my own utility based on NW (mc2router) and it has been very useful to tunnel traffic using mesh agent relay.
Here's a link, in case anyone wants to check out @jsastriawan's mc2router project.
There is already support for a different "meshaction.txt" with meshcmd:
meshcmd route --actionfile anotherfilename.txt
@baikal Thank you! I didn't know that was an option (I don't see it in the command line help)
BTW: the "route" parameter doesn't need to be included when calling meshcmd, it would appear that the "action" setting in the called actionfile is parsed, therefore No.1 in the OP has already been addressed.
I'm going to close this issue as @baikal has answered it. I will open up another issue regarding setting up multiple routes within a single file
Most helpful comment
There is already support for a different "meshaction.txt" with meshcmd:
meshcmd route --actionfile anotherfilename.txt