gpt4 book ai didi

linux - SCP 错误 : Bad configuration option: PermitLocalCommand

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:29:52 24 4
gpt4 key购买 nike

当我在下面执行这个命令时:

scp -P 36000  hdfs@192.168.0.114:~/tmp.txt SOQ_log.txt

我得到一个错误:

command-line: line 0: Bad configuration option: PermitLocalCommand

有人知道为什么吗?

最佳答案

scp 运行 ssh 程序的副本来创建通信 channel ,它使用以下选项运行 ssh:

-oForwardAgent=no -oPermitLocalCommand=no -oClearAllForwardings=yes

这首先解释了“PermitLocalCommand”选项的来源。我要补充一点,sftp 使用相同的选项来运行 ssh,因此它可能会显示相同的行为。

“PermitLocalCommand”通常是一个有效的 ssh 配置选项。如果您的 ssh 副本提示它,那么您的 ssh 副本似乎不是与您的 scp 副本一起使用的普通 ssh 副本。

This serverfault question表明该错误可能是由于有人在您的系统上安装了恶意软件版本的 ssh(即 rootkit)。 This forum thread还表明问题是由于 ssh 的更改版本引起的,该问题已通过删除并重新安装 OpenSSH 客户端实用程序得到修复。

另一种解释是,有人——也许是您的 Linux 发行版维护者——在您的系统上安装了一个 ssh 版本,但该选项已被删除,而您却在不知不觉中使用它。或者由于某种原因你有一个非常旧版本的 ssh 程序,它不支持该选项。

关于linux - SCP 错误 : Bad configuration option: PermitLocalCommand,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16182300/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com