From 505c09cd7b74db003324c5f283638fbfb8acc4b8 Mon Sep 17 00:00:00 2001 From: NathanFlurry Date: Thu, 5 Sep 2024 21:56:29 +0000 Subject: [PATCH] chore: enable batch ssh commands (#1119) ## Changes --- lib/bolt/core/src/tasks/ssh.rs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/bolt/core/src/tasks/ssh.rs b/lib/bolt/core/src/tasks/ssh.rs index bb9a6891aa..cb469f8ae7 100644 --- a/lib/bolt/core/src/tasks/ssh.rs +++ b/lib/bolt/core/src/tasks/ssh.rs @@ -45,9 +45,32 @@ async fn ip_inner( ) -> Result<()> { block_in_place(|| { if let Some(command) = command { - cmd!("ssh", "-t", "-l", "root", "-i", ssh_key.path(), ip, command).run() + cmd!( + "ssh", + "-o", + "StrictHostKeyChecking=no", + "-t", + "-l", + "root", + "-i", + ssh_key.path(), + ip, + command + ) + .run() } else { - cmd!("ssh", "-t", "-l", "root", "-i", ssh_key.path(), ip).run() + cmd!( + "ssh", + "-o", + "StrictHostKeyChecking=no", + "-t", + "-l", + "root", + "-i", + ssh_key.path(), + ip + ) + .run() } })?;