Skip to content

Commit

Permalink
chore: enable batch ssh commands (#1119)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Sep 5, 2024
1 parent 07b6095 commit 505c09c
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions lib/bolt/core/src/tasks/ssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
})?;

Expand Down

0 comments on commit 505c09c

Please sign in to comment.