Run command before starting a tunnel

core-tunnel

(Pranav Rameshrao Ganorkar) #1

Hello,

I want to run below command everytime before starting my remote tunnel, something like:

$ ssh zuser@10.0.0.0 -p 22 -t 'kill -9 $(sudo lsof -ti tcp:9000)'

to kill all the processes listening on port 9000 on the remote server 10.0.0.0. Is there any way to achieve this in core tunnel ?


(Yang.Y) #2

Unfortunately, it is not possible at this moment. This requires Core Tunnel removes "-T" and "-N" options, I have to do some test deliberately before removing "-TN". Will update this thread once we find a solution.