Skip to content

Commit

Permalink
fix scp key and destination handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fsck authored and Trolldemorted committed Feb 26, 2019
1 parent 7a70831 commit 3f0ed79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use EnokeysError;
pub fn deploy(destinations: &[Destination]) -> Result<(), EnokeysError> {
for destination in destinations {
Command::new("scp")
.args(&["-i", "./data/id_ed25519",
"-P", &format!("{}", destination.port),
.args(&["-P", &format!("{}", destination.port),
"-o", "StrictHostKeyChecking=no",
&destination.authorized_keys_file_name.to_str().unwrap().to_string(), &format!("{}@{}:/home/{}/.ssh/authorized_keys", &destination.userauth_agent, &destination.address, &destination.userauth_agent)])
&destination.authorized_keys_file_name.to_str().unwrap().to_string(), &format!("{}@{}:~/.ssh/authorized_keys", &destination.userauth_agent, &destination.address)])
.status()?;
}
Ok(())
Expand Down

0 comments on commit 3f0ed79

Please sign in to comment.