{"record":{"id":"78084e2253fe3950","repo":"nikivdev/code","slug":"ssh-command-failed","errorCode":null,"errorMessage":"SSH command failed: {}","messagePattern":"SSH command failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":1852,"sourceCode":"/// Run SSH command with inherited stdio.\nfn ssh_run(conn: &HostConnection, cmd: &str) -> Result<()> {\n    let status = Command::new(\"ssh\")\n        .args([\n            \"-p\",\n            &conn.port.to_string(),\n            \"-o\",\n            \"StrictHostKeyChecking=accept-new\",\n            &conn.ssh_target(),\n            cmd,\n        ])\n        .stdin(Stdio::inherit())\n        .stdout(Stdio::inherit())\n        .stderr(Stdio::inherit())\n        .status()\n        .context(\"Failed to run SSH\")?;\n\n    if !status.success() {\n        bail!(\"SSH command failed: {}\", cmd);\n    }\n    Ok(())\n}\n\n/// Run SSH command and capture output.\nfn ssh_capture(conn: &HostConnection, cmd: &str) -> Result<String> {\n    let output = Command::new(\"ssh\")\n        .args([\n            \"-p\",\n            &conn.port.to_string(),\n            \"-o\",\n            \"StrictHostKeyChecking=accept-new\",\n            &conn.ssh_target(),\n            cmd,\n        ])\n        .output()\n        .context(\"Failed to run SSH\")?;\n","sourceCodeStart":1834,"sourceCodeEnd":1870,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L1834-L1870","documentation":"Error \"SSH command failed: {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/deploy.rs:1852 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}