From 3855131185bae4edbd9f7ae7271e0277e23c591f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 18 Jun 2015 00:50:48 +0200 Subject: [PATCH] hydra-queue-runner: Improve SSH flags --- src/hydra-queue-runner/build-remote.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 39529e1a..e9278705 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -39,9 +39,11 @@ static void openConnection(const string & sshName, const string & sshKey, if (dup2(stderrFD, STDERR_FILENO) == -1) throw SysError("cannot dup stderr"); - // FIXME: ensure no password prompt. // FIXME: connection timeouts - Strings argv({"ssh", sshName, "-i", sshKey, "-x", "-a", "--", "nix-store", "--serve", "--write"}); + Strings argv( + { "ssh", sshName, "-i", sshKey, "-x", "-a" + , "-oBatchMode=yes", "-oConnectTimeout=60", "-oTCPKeepAlive=yes" + , "--", "nix-store", "--serve", "--write" }); execvp("ssh", (char * *) stringsToCharPtrs(argv).data()); // FIXME: remove cast