gpt4 book ai didi

ssh - ssh_config 中的多个 LocalForward

转载 作者:行者123 更新时间:2023-12-04 02:29:32 29 4
gpt4 key购买 nike

如何在 .ssh/config 文件中进行多端口转发?在命令行上,我可以执行以下操作:

    ssh 10.0.0.10 -L 8080:127.0.0.1:8080 -L 8443:127.0.0.1:443

但是当我这样做时:
    LocalForward 8080 127.0.0.1:8080
LocalForward 8443 127.0.0.1:443

在 .ssh/config 中,它不起作用。

最佳答案

ssh_config手册页说:

Multiple forwardings may be specified, and additional forwardings can be given on the command line. Only the superuser can forward privileged ports.



也许问题出在权限上,您是否对两个命令使用相同的用户?

关于ssh - ssh_config 中的多个 LocalForward,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24279328/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com