简体   繁体   English

如何添加用户以允许ssh隧道访问?

[英]How do I add users to allow ssh tunneling access?

我正在运行Cent OS 5.6,已为所有人禁用ssh隧道,但是我需要知道如何为特定用户启用它。

Use a "Match" statement in the sshd config can be used with a user or a group to enable or disable specific options. sshd配置中的“匹配”语句可以与用户或组一起使用,以启用或禁用特定选项。

In centos/rhel, there is an example at the bottom of the /etc/ssh/sshd_config file. 在centos / rhel中,/ etc / ssh / sshd_config文件的底部有一个示例。

# Example of overriding settings on a per-user basis
Match User anoncvs
       X11Forwarding no
       AllowTcpForwarding no
       ForceCommand cvs server

希望有人可以提供更好的答案,但是可以这样做:在另一个端口(例如222)上启动第二个sshd守护程序。在第二个sshd守护程序中,启用隧道,但是使用AllowUsersAllowGroups选项仅允许您使用特定用户才能建立隧道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM