How to use JProfiler over two-hop SSH tunnel

拈花ヽ惹草 提交于 2019-12-06 09:33:39

A direct tunnel is established with

ssh -t user@remote -L [localPort]:localhost:[remotePort] -N

A 2-hop tunnel is built with chained ssh commands:

ssh -t user@middle -L [localPort]:localhost:[remotePort] \
ssh -t user@remote -L [remotePort]:localhost:[remotePort] -N

where localPort is the port you want to use locally, and remotePort is the port that the profiling agent is listening on. All of this is executed in a single command on your local machine. More hops can be added with additional ssh calls like in the first line. There must by exactly one trailing -N for the entire command.

This approach works with JProfiler.

If the tunnels fails or if the profiling agent is not listening, you will get the message that you mentioned because of the way that the connection fails in the case of an SSH tunnel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!