--- title: ssh date: 2023-11-23 --- forward port ------------ How to forward local port 8385 to remote port 8384 ```bash ssh -L 8385:localhost:8384 remote ``` close ControlPersist sessions ----------------------------- The `-O` flag controls an active connection multiplexing master process. Valid commands are: * **check:** check that the master process is running * **forward:** request forwardings without command execution * **cancel:** cancel forwardings * **exit:** request the master to exit * **stop:** request the master to stop accepting further multiplexing requests Either *exit* or *stop* should work. ```bash ssh -O stop server ``` or ```bash ssh -O exit server ```