小编pli*_*han的帖子

强制 SSH 使用特定的 shell

有没有办法强制 SSH 在远程端使用特定的 shell,而不管用户的默认 shell 是什么?

我尝试过类似的解决方案:

ssh host.domain.com /bin/bash -c 'complicated, multi-line command'
Run Code Online (Sandbox Code Playgroud)

但不幸的是,远程端的默认 shell 负责解析“复杂的多行命令”部分,我很难充分地转义它以供 Bash 和 C shell 用户使用。

ssh shell bash command-line-interface

33
推荐指数
4
解决办法
9万
查看次数

标签 统计

bash ×1

command-line-interface ×1

shell ×1

ssh ×1