How do I configure my sshd to limit the port the client can tunnel to?
example:
A is client and B is server
A executes ssh -L local-port:localhost:remote-port user@B
B needs to be able to deny the tunneling if the remote port does not match a fixed value
Is this possible in ssh?
I tried
PermitOpen localhost:port
and
PermitListen port
inside sshd configuration but they didn't seem to work. But I'm not sure this is the right syntax.