How to restrict ssh port forwarding, without denying it?

Posted by Kaz on Super User See other posts from Super User or by Kaz
Published on 2012-12-07T20:18:53Z Indexed on 2012/12/07 23:22 UTC
Read the original article Hit count: 197

Filed under:
|

Suppose I have created an account whose login shell is actually a script which does not permit an interactive login, and only allows a very limited, specific set of commands to be remotely executed.

Nevertheless, ssh allows the user of this account to forward ports, which is a hole.

Now, the twist is that I actually want that account to set up a specific port forwarding configuration when the ssh session is established. But it must be impossible configure arbitrary port forwarding.

(It is an acceptable solution if the permitted port forwarding configuration is unconditionally established as part of the every session.)

© Super User or respective owner

Related posts about ssh

Related posts about port-forwarding