Run command before starting a tunnel


(Pranav Rameshrao Ganorkar) #1


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

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

to kill all the processes listening on port 9000 on the remote server 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.