A group of bash helper scripts with integrated command line completion that target a Procy (rportd) server. Sometimes it's just better to do things via the CLI.
Simply run the installer. It will check for prerequisites and guide you through the setup.
./install.shList all clients connected to the Rport server.
$ rport-clients
CLIENT_NAME CLIENT_ID STATUS HOSTNAME TUNNELS
client-01 e0668077-d9b8-40aa-b5e6-420f38b05637 online 10.2.20.10 1
client-02 e0668077-d9b8-40aa-b5e6-420f38b05638 offline 10.2.20.11 0
$ rport-clients --status=online
CLIENT_NAME CLIENT_ID STATUS HOSTNAME TUNNELS
client-01 e0668077-d9b8-40aa-b5e6-420f38b05637 online 10.2.20.10 1
$ rport-clients --status=offline
CLIENT_NAME CLIENT_ID STATUS HOSTNAME TUNNELS
client-02 e0668077-d9b8-40aa-b5e6-420f38b05638 offline 10.2.20.11 0
Show the status of the Rport server.
$ rport-status
{
"id": "e0668077-d9b8-40aa-b5e6-420f38b05637",
"name": "rport-server",
"version": "0.9.5",
"fingerprint": "SHA256:fingerprint",
"clients": 2,
"tunnels": 1,
"started_at": "2024-01-24T15:40:47.921937256-06:00",
"updated_at": "2024-01-24T15:40:47.921937256-06:00",
"os": "linux",
"os_arch": "amd64",
"os_family": "ubuntu",
"os_kernel": "5.15.0-1023-aws",
"hostname": "rport-server",
"cpu_count": 2,
"total_ram": 4096,
"free_space": 20480,
"address": "10.2.20.10",
"client_id": "e0668077-d9b8-40aa-b5e6-420f38b05637"
}
SSH into a client connected to the Rport server. You can also optionally execute a command on the remote host.
$ rport-ssh client-01
$ rport-ssh client-01 "ls -l /tmp"
Securely copy files to/from a client connected to the Rport server.
$ rport-scp local-file.txt client-01:remote-file.txt
Synchronize files/directories to/from a client connected to the Rport server using rsync over SSH.
$ rport-rsync ./local-dir/ client-01:/remote/dir/
$ rport-rsync client-01:/remote/dir/ ./local-dir/
$ rport-rsync -d ./local-dir/ client-01:/remote/dir/
Use -d to delete files at the destination that are not present in the source (rsync --delete).
Show metadata (vault key/value pairs) for a client in JSON format.
$ rport-metadata client-01
{
"ssh-user": "admin",
"ssh-pass": "secret"
}
Mount a remote directory from a client connected to the Rport server via SSHFS.
$ rport-sshfs client-01:/home/admin /mnt/remote
Create a tunnel to a client connected to the Rport server. The optional second argument sets the remote port (default: 22).
$ rport-tunnel client-01 3389
Pass a third argument to instead forward through the client to another host reachable on its network (e.g. a device on its LAN), rather than to the client itself:
$ rport-tunnel client-01 104 192.168.1.50
Pull requests are welcome. Please open an issue first to discuss what you would like to change.
Apache-2.0