xfreerdp
Connect with FreeRDP
Keep passwords out of command-line arguments. Confirm the target certificate on first use and redirect only a dedicated, approved staging directory.
read -r -p 'RDP host: ' rdp_host
read -r -p 'RDP user: ' rdp_user
xfreerdp /v:"$rdp_host" /u:"$rdp_user" /from-stdin /cert:tofu /dynamic-resolution
Before relying on /from-stdin or /cert:tofu, check xfreerdp /help because option names vary between major FreeRDP releases.
If drive redirection is authorized, create a dedicated directory containing only approved files:
mkdir -p "$HOME/rdp-staging"
chmod 700 "$HOME/rdp-staging"
xfreerdp /v:"$rdp_host" /u:"$rdp_user" /from-stdin /cert:tofu \
/drive:Staging,"$HOME/rdp-staging"
Do not redirect the entire working directory and do not bypass certificate validation with /cert:ignore.