如何在 .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/