【问题标题】:What is the .ssh/config corresponding option for ssh -Nssh -N 的 .ssh/config 对应选项是什么
【发布时间】:2022-02-03 22:11:18
【问题描述】:

我正在尝试在我的配置中设置一个别名,它应该给出与

相同的结果
ssh -N -L 3307:1.1.1.1:3306 username@remoteip

我当前的 .ssh/config 看起来像这样。

Host connect
    User username
    HostName remoteip
    port 22
    LocalForward 3307 1.1.1.1:3306

我在上面的配置中放了什么不启动shell?

Host connect
    User username
    HostName remoteip
    port 22
    LocalForward 3307 1.1.1.1:3306
    SessionType none

sessiontype 只是给出了 Bad configuration option: sessiontype 即使它记录在 manual for ssh 选项中

【问题讨论】:

    标签: ssh openssh ssh-tunnel ssh-config


    【解决方案1】:

    您使用的是什么版本的 SSH (ssh -V)?

    release notes 看来,此功能仅在去年 8 月发布的 8.7 版中添加。也许更新 SSH 可能会解决您的问题?

    【讨论】:

    • 为了清楚起见,SessionType 选项是新的,而-N 标志已经存在了一段时间。您可能拥有支持 -N 但不支持 SessionType 的 ssh 版本。
    • 感谢@drlim2u 的提示。我没有意识到我需要更新我的 ssh,8.4p1 是从 2021 年 8 月 24 日开始的,但那个日期正是应用安全补丁的时间。 8.4 是从 2019 年开始的。
    猜你喜欢
    • 2019-01-18
    • 1970-01-01
    • 2013-01-19
    • 2013-11-17
    • 2021-07-02
    • 1970-01-01
    • 1970-01-01
    • 2020-06-21
    • 2015-01-11
    相关资源
    最近更新 更多