From dd6b242256b041cdfc17fab38892e4871d22b138 Mon Sep 17 00:00:00 2001
From: Piotr Krawczyk
Date: Mon, 30 Jan 2017 11:24:43 +0100
Subject: [PATCH] Reading a default ssh user while executing remote command
---
src/Runtime/Runtime.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Runtime/Runtime.php b/src/Runtime/Runtime.php
index 3bcd793..e03cc48 100644
--- a/src/Runtime/Runtime.php
+++ b/src/Runtime/Runtime.php
@@ -407,7 +407,7 @@ class Runtime
*/
public function runRemoteCommand($cmd, $jail, $timeout = 120)
{
- $user = $this->getEnvOption('user');
+ $user = $this->getEnvOption('user', $this->getCurrentUser());
$sudo = $this->getEnvOption('sudo', false);
$host = $this->getWorkingHost();
$sshConfig = $this->getSSHConfig();