With rportcli you can create tunnels to your remote machines. Optionally, you can directly launch an application
such as ssh or remote desktop to instantly log in. Examples:
Create an SSH tunnel to a client called “Juan-Ford” and execute the openSSH client on it
Create an RDP tunnel to a client called ABRAHAM and start the remote desktop using the Administrator user.
rportcli tunnel create -n ABRAHAM -s rdp -d -u Administrator
Create tunnels
With rportcli tunnel create you can establish a tunnel to a client.
You have three mutual exclusive options to specify the client the tunnel is created for. Also called targeting.
By name -n, --name string
The client is identified by its name. Example:
rportcli tunnel create -n My-Remote-Machine
π§ββοΈ Wildcards are supported. If you don’t want to type in a long name, use -n "Alvin*" for example.
If more than one client matches the wildcard search, you will get an error.
Don’t omit the quotation marks. Otherwise, the wildcard sign * is resolved by your shell.
Create a so-called service forwarding. The host “ANTMAN” is used as a bridge host to create a tunnel for RDP to a
remote machine where rport is not installed.
All tunnels are protected with a tight access control list (ACL) by default. Only the current public IP Address of
the rportcli host will be allowed to access the port of the tunnel. Use -a, --acl to create custom ACLs.
Also, all tunnels are closed automatically after an inactivity of 5 minutes. Use -m, --idle-timeout-minutes int
to change this behaviour.
Close tunnels
Use rportcli tunnel list to display the list of active tunnels.
Then use rportcli tunnel delete -c <CLIENT-ID> -u <TUNNEL-ID> to delete a tunnel for a client.
See rportcli tunnel delete -h for all options.
Time-saving shortcuts: Create and launch tunnels π
For the two most widely used remote access protocols, SSH and RDP, rportcli has built-in shortcuts.
After a tunnel is created, openSSH or Microsoft Remote Desktop will automatically start a session.
Remote Desktop
Create a tunnel for RDP to the host identified by its name. The Remote Desktop Client will automatically start
using the username “Administrator” and a geometry of 1024*768.
Behind the scenes rportcli creates a temporary .rdp file and then the default app for this file type is launched.
SSH
Create a tunnel for SSH to the host identified by its name. The openSSH client is started with the ssh
options -l root -A, meaning that the SSH user is root and the ssh-agent is passed into the session.
Rportcli will directly launch ssh - the open-ssh client - with the port of the tunnel appended.
Other SSH client such as Putty for example are not supported.
The tunnel is closed automatically after the ssh client is closed. You don’t need to do this manually.
This applies only to ssh. For other apps a tunnel close can’t be triggered on app close.
Tunnels will close after 5 minutes without network activity.
URI Open
To access http, https, vnc or realvnc services via a tunnel, you can use the generic URI launcher.
For example: