3.6 Pushing agents over the network (push)
With push, the server installs the agent on a target machine itself: over SSH on Linux, over WinRM with HTTPS or over SMB on Windows. The Deployment page bundles machine discovery, the prepare script for Windows and stored credentials. For single machines, the pull command from section 3.5 Installing agents is usually simpler.
Push or pull
Pull command (section 3.5) | Push | |
|---|---|---|
Who starts the installation | A person on the target machine | The server |
Preparing the target | None | Linux: an account with |
Credentials | None, only a token | User and password or SSH key of the target |
Suited for | Any Windows and Linux machine, Windows Home and Pro in a workgroup | Many Linux machines, prepared Windows PCs |
Pull is the recommended way for Windows. Without preparation, push cannot work there, because WinRM is off by default and UAC filtering for remote access strips the rights of local administrators over the network.
The Deployment page
Deployment in the menu opens the page with four areas. It is also the basis for updating (see section 3.7 Updating and uninstalling).
Area | Content |
|---|---|
Agent packages | Packages in the server's |
Agent versions | All active agents with host, platform, version, build and state. Filters Outdated and All; buttons Update all outdated and Update (see section 3.7 Updating and uninstalling). |
Install on new machines | Three routes: Add agent (pull command, "any Windows or Linux PC. Default."), Discover ("Scan the network, push over SSH or WinRM.") and Prepare script ("Once per Windows PC before push. Relaxes remote UAC filtering."). |
Push credentials | Stored credentials for push (admins only). |
Discovering and pushing require at least the Operator role; only admins manage stored credentials (see Chapter 11 Users and Security).
Requirements
Linux (SSH)
The target needs no preparation: all it needs is an account that may run
sudo(orroot).The server can reach the target's SSH port (default 22).
The target can reach the server on TCP 8444, and the chosen server address is in the certificate.
Sequence: the server connects over SSH, checks
sudo, uploads the agent file and verifies its SHA-256, installs it as/opt/pdc-agent/pdc-agent, enrolls the agent with a single-use token (passed on standard input, not as a command-line argument), then creates and starts the systemd unitpdc-agent. On a target without systemd the agent is installed and enrolled but must be started by hand (/opt/pdc-agent/pdc-agent run); the push then ends with a warning.
Windows (WinRM or SMB)
The server itself runs on Windows.
The target was prepared once with the prepare script (see below). WinRM is off by default on Windows clients, and UAC filtering strips local administrators of their rights over the network.
WinRM over HTTPS needs TCP 5986 on the target. The SMB route copies the agent to the
ADMIN$share and temporarily creates a servicePDCBackupAgentSetup; it needs TCP 445.The target can reach the server on TCP 8444, and the chosen server address is in the certificate.
For most home PCs the pull command is simpler.
Discovering machines on the network
Open Deployment and click Discover. The Discover machines dialog scans an IPv4 subnet and lists the machines it finds.
Option | Effect | Default |
|---|---|---|
Subnet (IPv4, up to /22) | Range to scan in CIDR notation, at most /22 (1024 addresses). | The /24 network of the server address if the browser reaches the server through a private IPv4 address, otherwise the subnet scanned last |
Ports | The ports probed for being open: 22 (SSH), 139 (NetBIOS), 445 (SMB), 3389 (RDP), 5985 (WinRM), 5986 (WinRM-HTTPS). The operating system is guessed from them. | 22, 445, 5985, 5986 |
Ping | Sends one system ping per host, which also finds machines whose probed ports are all closed. | off |
Scan | Starts the scan. Progress reads "{n} / {m} hosts". | – |
Cancel scan | Stops probing new hosts; hosts found so far are kept. | – |
List of earlier scans | Shows the last 20 runs (subnet, time, number found). | last scan |
Hide enrolled | Hides hosts whose IP or host name matches an active agent. | off |
The result table shows IP, Host name (reverse DNS), OS guess, Open ports, Ping and Push for each host. The Push column says how a push would reach the host:
Display | Meaning |
|---|---|
enrolled | An agent already runs on the host. It cannot be selected. |
prepared (WinRM-HTTPS) | Windows host with port 5986 open. |
not prepared | Windows host without port 5986. Prepare… opens the prepare script. |
SSH | Host with port 22 open. |
– | No route detected. |
Each row has Push install (and Prepare… for unprepared Windows hosts). To select several hosts, tick the boxes and choose Push install to {n}; this works only for hosts of the same operating system ("Select hosts of one OS"). The right-click menu of a row offers the same actions and copies the IP, host name and open ports.
Installing by push
The Push install dialog opens from the discovery list or, for hosts that were not scanned, through the address you enter.
Set the hosts: taken over from the scan (each removable with the cross) or entered under Host (IP or name, several separated by spaces). The Windows / Linux switch sets the operating system (preset from the scan results).
Enter the credentials (table below) and check the Server address the machine will use. If it is not in the certificate, the dialog warns "not in the server certificate: the agent will refuse it".
On Linux, confirm the SSH host keys first (see below). Then click Push install or Push install to {n} hosts. A single-use enrollment token is created per host.
Follow the progress in the status list (columns Host, Status, Details, button Log). On success it reads "Installed and enrolled."; warnings appear below. Retry failed restarts only the failed hosts.
Option | Effect | Default |
|---|---|---|
Credential source: Enter now / Stored ({n}) | Type the credentials for this run or pick stored ones (only admins see the switch, and only if matching stored credentials exist). | Enter now |
User | Account on the target. | Linux: |
Sign in with (Linux only): Password / SSH key | Sign-in method. | Password |
Password | Password of the account. Always required on Windows. | empty |
Private key, load file… | Private SSH key (PEM), pasted or loaded from a file. | empty |
Key passphrase | If the key has one. | empty |
sudo password (Linux only, not for | same as password uses the same password; with an SSH key, empty means passwordless sudo. | same as password |
SSH port (Linux only) | Port of the SSH service on the target, 1 to 65535. | 22 |
Method (Windows only): WinRM HTTPS / SMB | WinRM HTTPS is the standard route. SMB is the "fallback without WinRM: copy over SMB and create the service". | WinRM HTTPS |
Remember as (admins only) | Stores the entered credentials encrypted on the server under that name, for later pushes. The name is preset to | off |
Server address the machine will use | Address and port 8444 under which the target reaches the server, with suggestions from the certificate. | Name from the browser address bar |
For Windows hosts where the scan found port 5986 closed, the dialog shows: "Works only on PCs prepared once with the prepare script; port 5986 is closed on …". Next to it are Prepare script… and Use pull command. The credentials are removed from the dialog once the runs have been created.
Confirming the SSH host key (Linux)
There is no trust on first use. Before the first push to a Linux machine, the server reads the target's SSH host key and shows, in the step "Push install · confirm SSH host keys", Host, Type, Fingerprint (SHA256:…) and Matches for each host.
On the target (console or a trusted session), determine the fingerprint:
ssh-keygen -l -E sha256 -f /etc/ssh/ssh_host_<type>_key.pub(the right-click menu of the row copies the finished command).Compare both values and tick the box yes. Only then does Push install become available.
The server remembers the confirmed key ("pinned"). For later pushes to the same host with an unchanged key there is nothing to confirm.
The connection ends after the key exchange, so the user name and password never go to an unconfirmed machine. If the key is different later, the run aborts before sign-in ("Host key changed. Pinned: …"). Only an admin can confirm the new key after checking it, with replace; other roles see "blocked". Hosts without a confirmable key are skipped. Back returns to the form.
Preparing a Windows PC for push
The prepare script sets up a Windows PC once for remote deployment. The server generates it per machine: Deployment and Prepare script (or Prepare… in discovery) open the dialog Prepare a Windows PC for push.
Option | Effect | Default |
|---|---|---|
PC address used for push | Name or IP under which the server reaches the PC. It goes into the listener certificate and the WinRM endpoint. Must be a name of the target; the server rejects server names, | empty (example |
Port | WinRM HTTPS port. | 5986 |
Create local admin account | Creates a dedicated local administrator account for PDC-Backup. | on |
Account name | Name of that account. The script asks for the password on the PC. |
|
Create scripts (later Recreate) | Generates the Prepare script and the Restore script. | – |
The prepare script (prepare) does the following on the target:
It imports a WinRM HTTPS certificate that the server issues with its own deploy CA (a CA that agents do not trust, so the certificate cannot impersonate the server) and binds an HTTPS listener to it.
It opens the firewall for TCP 5986 in the Private and Domain profiles.
On request, it creates the local administrator account.
It sets
LocalAccountTokenFilterPolicy=1so that a local administrator keeps full rights over the network.
Start the scripts on the PC with the Run command: copy the file to the PC, open PowerShell as administrator in that folder and run the command shown. The dialog states the fingerprint of the listener certificate. After a TLS error in a push run ("TLS check failed …"), run the prepare script again.
Stored push credentials
The Push credentials area (admins only) holds credentials permanently. They are stored encrypted on the server and never shown again. Without stored credentials, they are requested for every push. Add opens the form:
Field | Effect | Default |
|---|---|---|
Name | Label (example "Home PCs"). | empty |
Kind | Windows or SSH. | Windows |
User | Account on the target. | Windows: |
Password | Password of the account. Optional for SSH if a private key is given. | empty |
Private key (instead of a password) | SSH only. | empty |
Key passphrase | SSH only. | empty |
sudo password | SSH only. | empty |
Store creates the entry. The list shows Name, Kind, User and Created; an entry can be deleted with the trash icon or the right-click menu.
Common push errors
When a run fails, the status list shows a hint next to the error message:
Message points to | Hint in the interface |
|---|---|
Name cannot be resolved | The target cannot resolve the server address. Pick a server address the target can reach (IP or DNS name in the certificate). |
Sign-in refused (Windows) | Use the local admin account from the prepare script; remote UAC filtering blocks other local accounts. |
Sign-in refused (Linux) | Check user name, password or key. |
| Enter the sudo password, or use |
Not reachable (Windows) | WinRM-HTTPS is not reachable. Run the prepare script on this PC once, or use the pull command. |
Not reachable (Linux) | SSH is not reachable on this port. |
TLS error | Re-run the prepare script so the listener uses a certificate from this server. |
More cases are in section 3.8 Installation troubleshooting.