Ad Hoc Ports and Port Overrides

By default, all datasources of a given type share the same port on the client side. This port is normally the default port for that datasource type (for instance, 3306 for MySQL or 5432 for Postgres) but auto-increments if that port is already taken on the client. In order to connect to a different datasource of the same type, the user has to disconnect from the first datasource and connect to the second. If she has to connect to multiple datasource of the same type simultaneously, however, there are two options: ad hoc ports and port overrides. This document describes these two methods.

Note: SSH servers are automatically assigned their own persistent ports and do not use ad hoc ports or port overrides.

Ad Hoc Ports

GUI

To create an ad hoc port in the client GUI, click and drag a datasource to the bottom of the strongDM window, where a green bar will appear labeled create new port. Release it, and that datasource will be given its own persistent port under additional ports.

Ad hoc port

These ports will persist between strongDM restarts. To destroy an ad hoc port, click and drag it to the bottom of the window where a red bar will appear labeled delete port. Release it there, and the ad hoc port will be deleted.

CLI

To create an ad hoc port via the SDM CLI, you can add a port number to the sdm connect command:

$ sdm connect mssql1 1500
connect successful
$ sdm status
     DATASOURCE NAME                    STATUS            PORT      TYPE
     mssql1                             not connected     1433      mssql
     mssql1                             connected         1500      mssql

You can specify any port, with the following exceptions:

Port Overrides

While ad hoc ports are great for individuals, in larger organizations it often makes sense to codify these persistent ports using the port overrides setting. By enabling this option (Settings > Port Overrides,) you can set persistent individual ports for each datasource in your organization. This means that every user will use the exact same port to connect to each datasource, so you can share connection strings with confidence that they will work across all users who have access to that datasource.

Turning on port overrides

Go to Settings > Port Overrides and switch the radio button from ‘No’ to ‘Yes’. Fill in the port override field for each datasource, or click ‘Autofill’ to let strongDM choose ports. Click ‘update’.

Port override setting

Warning: enabling or disabling port overrides will interrupt and sever any active datasource and server connections.

End-user experience

With port overrides turned off, users are able to connect to one datasource at a time of the same type, or create ad hoc ports.

Port overrides off Without port overrides

With port overrides turned on, users automatically have ports assigned for each datasource and can connect to as many as they like at any time.

Port overrides on With port overrides