diff --git a/end-to-end-tests/src/instance_launch.rs b/end-to-end-tests/src/instance_launch.rs index 019bd73b04..c2f9c0c285 100644 --- a/end-to-end-tests/src/instance_launch.rs +++ b/end-to-end-tests/src/instance_launch.rs @@ -32,7 +32,7 @@ async fn instance_launch() -> Result<()> { .body(SshKeyCreate { name: ssh_key_name.clone(), description: String::new(), - public_key: public_key_str, + public_key: public_key_str.clone(), }) .send() .await?; @@ -132,7 +132,10 @@ async fn instance_launch() -> Result<()> { .split_once("-----BEGIN SSH HOST KEY KEYS-----") .and_then(|(_, s)| s.split_once("-----END SSH HOST KEY KEYS-----")) .and_then(|(lines, _)| { - lines.trim().lines().find(|line| line.starts_with("ssh-ed25519")) + lines + .trim() + .lines() + .find(|line| line.contains(public_key_str.clone().as_str())) }) .and_then(|line| line.split_whitespace().nth(1)) .context("failed to get SSH host key from serial console")?;