1
假設pssh的-x選項傳遞額外的SSH命令行參數。 SSH的「-t」選項應該已經處理了「僞終端」錯誤。是否還有另外一個應該使用的pssh/ssh選項?「Force psuedo-tty allocation」不會轉換爲pssh
# pssh -i -H [email protected] -H [email protected] -x "-t -i /tmp/key.pem" 'sudo hostname'
[1] 13:46:54 [FAILURE] [email protected] Exited with error code 1
Stderr: Pseudo-terminal will not be allocated because stdin is not a terminal.
sudo: sorry, you must have a tty to run sudo
[2] 13:46:54 [FAILURE] [email protected] Exited with error code 1
Stderr: Pseudo-terminal will not be allocated because stdin is not a terminal.
sudo: sorry, you must have a tty to run sudo
沒有「-t」和「命令」,命令工作正常,但我需要運行一些命令,sudo的。
# pssh -i -H [email protected] -H [email protected] -x "-i /tmp/key.pem" 'hostname'
[1] 14:08:35 [SUCCESS] [email protected]
ip-10-0-0-140
[2] 14:08:35 [SUCCESS] [email protected]
ip-10-0-0-139
雖然這確實欺騙了一個奇怪的錯誤,但錯誤似乎並未影響pssh的執行。 – user2569618