Background:
The UNIX rsync command is used to synchronize files across systems. The command uses SSH for this purpose.
It is possible to leverage PSMP for proper session isolation and monitoring. Please find below the syntax for the rsync command (Source:
https://www.linuxtechi.com/rsync-command-examples-linux/)
Syntax of rsync command:
Local Sync: # rsync {options} {Source} {Destination}
Remote Sync pull: # rsync {options} <User_Name>@<Remote-Host>:<Source-File-Dir> <Destination>
Remote Sync Push: # rsync <Options> <Source-Files-Dir> <User_Name>@<Remote-Host>:<Destination>
Some of the commonly used options in rsync command are listed below:
- -v, –verbose Verbose output
- -q, –quiet suppress message output
- -a, –archive archive files and directory while synchronizing ( -a equal to following options -rlptgoD)
- -r, –recursive sync files and directories recursively
- -b, –backup take the backup during synchronization
- -u, –update don’t copy the files from source to destination if destination files are newer
- -l, –links copy symlinks as symlinks during the sync
- -n, –dry-run perform a trial run without synchronization
- -e, –rsh=COMMAND mention the remote shell to use in rsync
- -z, –compress compress file data during the transfer
- -h, –human-readable display the output numbers in a human-readable format
- –progress show the sync progress during transfer
For more information on PSMP usage, please refer to the "Privileged Access Security End User Guide" (Versions up to v10.9) or
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/Landing%20Pages/lp_Privileged... (v10.10 and higher)
Issue
Hello team, A customer is trying to do some tests with the rsync command via PSMP. When trying this the following error message prompts: rsync -av /usr/local/netsaint/libexec/ cyberark_user@
[email protected]@76.249.80.109:libexec/ cyberark_user@cyberark_ssh@
[email protected]'s password: protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: unexplained error (code 255) at compat.c(178) [sender=3.1.2] Does anyone know how to configure the PSMP to allow a connection via rsync? Thanks.
Environment
Component: PSMP Functional Area: Configuration
Steps
To use the rsync command, we need to use one of the following examples:
1. rsync -av /home/test01/sync cyberark_user@
[email protected]@76.249.80.109:/home/cyberark_ssh/sync
Note: You can specify more than one "v" in the arguments for more verbose output
OR
2. ssh -t <vault user>@<target user>@<target host>@<psmp> rsync -av <directory> <vault user>@<remote target user>@<remote target host>@<psmp>:<target folder>
Either option will produce the same result, although option (1) is more streamlined