当我在 alpine linux 上安装 sshpass 时,它将安装并且如果您不带参数运行它,文档将显示,但使用任何参数(有效或无效)返回sshpass: Failed to run command: No such file or directory
.
它是路径化的,即使使用绝对路径,它也具有相同的行为。我想将它与 ansible 一起使用,但它甚至不能直接工作。
我似乎无法在网上找到有关此功能或不适用于其他人的任何信息,但我使用了其他人的容器和我自己的容器,但我无法让它在任何一个上运行。 https://pkgs.alpinelinux.org/package/v3.3/main/x86/sshpass
$ docker run -it --rm williamyeh/ansible:alpine3 ash
/ # sshpass
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
-f filename Take password to use from file
-d number Use number as file descriptor for getting password
-p password Provide password as argument (security unwise)
-e Password is passed as env-var "SSHPASS"
With no parameters - password will be taken from …
Run Code Online (Sandbox Code Playgroud)