Created attachment 2975 [details] Patch This is a patch to: 1. Allow the authorized_keys file to include a new option, permitgwport="portnum". This allows the server to control what ports a ssh client may open using ssh -R. If there is no permitgwport, then the client may not open any ports using ssh -R. 2. Require that authorized_keys file has a permitopen option for each ssh -L port forwarding the client will request. In particular, if there are no permitopen statements, do not allow any ports to be opened (default deny), which is different from normal sshd behaviour which will allow any ports be opened if there is no permitopen option. Thanks,
Created attachment 2976 [details] Patch
We added PermitListen to openssh-7.8 that works similarly
closing resolved bugs as of 8.6p1 release