Disclaimer: my company is developing JProfiler
With JProfiler, the VM parameter is as follows:
-agentpath:/path/to/libjprofilerti.so=port=8849
"/path/to/libjprofilerti.so" is the path to the library of native agents, on Linux x86, for the 32-bit JVM it will be [JProfiler installation directory] /bin/linux-x86/libjprofilerti.so, with the port parameter you can tell the agent to listen on a specific port. You can install this in the port of your SSH tunnel.
You can easily generate this VM parameter by calling Session-> Integration Wizards-> New Remote Integration in the JProfiler main menu:

On your local machine, you create a new session of type βAttach to a profiled JVMβ and select the local port of your SSH tunnel (10022 in the screenshot):

source share