【问题标题】:VS Code Extension: Remote - SSH. How do I specify a ssh command for connectionVS 代码扩展:远程 - SSH。如何为连接指定 ssh 命令
【发布时间】:2020-12-07 04:09:50
【问题描述】:

我有一台服务器,其 SSH 连接如下:

ssh -t admin@192.168.1.10 /bin/bash

如果我没有明确指定 /bin/bash,它将运行另一个应用程序而不是 shell(无权访问服务器来更改它)。

如何在 Remote-SSH 扩展中配置/bin/bash shell 命令?目前的配置是:

Host 192.168.1.10
  HostName 192.168.1.10
  User admin
  RequestTTY yes

【问题讨论】:

    标签: bash shell visual-studio-code ssh remote-access


    【解决方案1】:

    你可以使用RemoteCommand

    Host 192.168.1.10
      HostName 192.168.1.10
      User admin
      RequestTTY yes
      RemoteCommand /bin/bash
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-25
    • 2021-01-29
    • 2015-05-02
    • 2011-09-18
    • 2020-11-07
    • 1970-01-01
    相关资源
    最近更新 更多