ssh - ssh_config 中的多个 LocalForward

标签 ssh config

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

相关文章:

java - 我想知道如何转换Spring mvc Java配置环境

symfony - 在symfony2的参数中的动态服务ID?

c# - 从 C# 自定义配置文件中检索信息

python - 为 Python 程序创建配置文件

python - Python Pexpect SSH命令行登录参数

jenkins - 为什么 Jenkins 在启动代理时说 "Server rejected the 1 private key(s)"?

linux - 使用 SSH 从 jenkins 运行 SSH 脚本命令

linux - Git 在不同端口下运行 SSH

nginx - 如何让nginx监听server_name :port

ssh - gitlab runner ssh私钥644文件权限错误