On Ubuntu it would be this:
sudo apt-get install freerdp2-x11
xfreerdp /cert:ignore +auth-only /u:user /p:pass /v:host
And if you don't have a display, you can use a virtual one:
sudo apt-get install ...
It should work without eval.
In this bash: line 1: secret1: command not found we can see that for whatever reason it tries to execute command secret1. Most likely it is due to the eval messing with it....