Allow user to set up an SSH tunnel, but nothing else

后端 未结 10 2149
小蘑菇
小蘑菇 2020-12-22 16:47

I\'d like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I want to restrict this user as much as possible. (Authentica

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 17:16

    Besides authorized_keys option like no-X11-forwarding, there actually is exactly one you are asking for: permitopen="host:port". By using this option, the user may only set up a tunnel to the specified host and port.

    For the details of the AUTHORIZED_KEYS file format refer to man sshd.

提交回复
热议问题