There are a number of ways to leverage the FRP connection for pushing files to remote QWS clients. Below are a few options that have been tested for functionality, but any tool that can leverage the IP and port information provided by the FRP web tool can be used for this purpose.
Linux Management Host
Multiple Option - PSSH & and PSCP
- The source can be found here - https://github.com/ParallelSSH/parallel-ssh
...
- . Depending on your host OS, there are also pre-built RPM and DEB files available from repositories
- Create a file (ie. QWS_CLIENTS) with each remote IP and port of the QWS clients, each on their own line as: admin_user@FRP_IP:PORT
- Alternatively, this file can also be directly downloaded from the portal, but that will only be populated with currently connected clients. Ports are configured dynamically, so this will change over time as client disconnect / reconnect.
- To push files in parallel to all QWS clients, the syntax is as follows:
- pscp.pssh -h QWS_CLIENTS filename /remotedir
- Success / failure status will be presented back in the CLI for each line in the QWS_CLIENTS file
- This method would allow for the same file to be transferred to multiple targets at once
- To execute the same command on multiple QWS clients in parallel:
- pssh -i -h QWS_CLIENTS "command to be executed"
- Success / failure status will be presented back in the CLI for each line in the QWS_CLIENTS file
- This method would allow for the silent installation on multiple targets at once
- Note that the file will either have to be an MSI, or and EXE that supports silent command line switching (ie - WinSCP-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART)
- Create a file (ie. QWS_CLIENTS) with each remote IP and port of the QWS clients, each on their own line as: admin_user@FRP_IP:PORT
Individual Option - SSH and
https://www.tecmint.com/copy-files-to-multiple-linux-servers/
GitHub - https://github.com/ParallelSSH/parallel-ssh
Individual
SSH & SCP
- From the FRP website, find the entry for the client, and note the port number. The syntax to connect is as follows:
Windows Management Host
Multiple Option - WSUS
...
- Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
To install Chocolatey on the remote client will require that PowerShell be open in elevated mode, and then enter the following commands:Install Chocolatey Remote
https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/
Open elevated Powershell
- netsh winhttp reset proxy
- Enable-PSRemoting -Force -SkipNetworkProfileCheck
- Set-Item wsman:\localhost\client\trustedhosts *
- Restart-Service WinRM
- Test-WsMan
...
- QWS_VM_NAME
- Invoke-Command -ComputerName
...
- QWS_VM_NAME-ScriptBlock { choco install app -y } -credential Administrator