From ba02a166e7623a797fb329da63a858d82f8e8636 Mon Sep 17 00:00:00 2001 From: NathanFlurry Date: Wed, 3 Jul 2024 08:44:25 +0000 Subject: [PATCH] fix(ssh): force user for ssh commands (#949) ## Changes --- lib/bolt/core/src/tasks/ssh.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bolt/core/src/tasks/ssh.rs b/lib/bolt/core/src/tasks/ssh.rs index c35bfdb3c2..72fb0fd574 100644 --- a/lib/bolt/core/src/tasks/ssh.rs +++ b/lib/bolt/core/src/tasks/ssh.rs @@ -45,9 +45,9 @@ async fn ip_inner( ) -> Result<()> { block_in_place(|| { if let Some(command) = command { - cmd!("ssh", "-t", "-i", ssh_key.path(), ip, command).run() + cmd!("ssh", "-t", "-l", "root", "-i", ssh_key.path(), ip, command).run() } else { - cmd!("ssh", "-t", "-i", ssh_key.path(), ip).run() + cmd!("ssh", "-t", "-l", "root", "-i", ssh_key.path(), ip).run() } })?;