如何在ssh配置文件中指定RemoteForward?

问题描述 投票:0回答:1

我正在尝试通过远程端口转发设置ssh隧道。这个想法是让VPS充当ssh进入远程部署系统(目前已包含Raspberry Pi)的一种方式。一切似乎都正常,但是在尝试将所有参数移至〜/ .ssh / config文件时遇到了问题。起作用的是主机名,用户,端口和身份文件的设置。但是,设置RemoteForward参数似乎无效。

以下作品:

ssh -R 5555:localhost:22 ssh-tunnel

但是如何在配置文件中使用以下行;

Host ssh-tunnel
    ...
    RemoteForward 5555 localhost:22

以下命令返回消息“错误的远程转发规范'ssh-tunnel'”

ssh -R ssh-tunnel
ssh ssh-tunnel ssh-config
1个回答
0
投票
ssh -f -N ssh-tunnel
© www.soinside.com 2019 - 2024. All rights reserved.