Silences SSH warnings (Errors still output of course).

This commit is contained in:
Joao Patricio 2023-03-20 20:47:30 +00:00
parent 8de996a368
commit 9a7a992495

View File

@ -55,6 +55,10 @@ public function handle(): ?ProcessResult
$sshCommand = 'ssh ' $sshCommand = 'ssh '
. '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ' . '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
. '-o PasswordAuthentication=no ' . '-o PasswordAuthentication=no '
// Quiet mode. Causes most warning and diagnostic messages to be suppressed.
// Errors are still out put. This is to silence for example, that warning
// Permanently added <host and key type> to the list of known hosts.
. '-q '
. "-p {$port} " . "-p {$port} "
. "{$user}@{$destination} " . "{$user}@{$destination} "
. " 'bash -se' << \\$delimiter" . PHP_EOL . " 'bash -se' << \\$delimiter" . PHP_EOL