diff --git a/dot_config/private_fish/functions/sshtmp.fish b/dot_config/private_fish/functions/sshtmp.fish index 2b820772d2c6e5cf8cc42531ae45d7da3a21aaa6..2cac53d7aa58b931446bbd1376ac6acdccce2fcd 100644 --- a/dot_config/private_fish/functions/sshtmp.fish +++ b/dot_config/private_fish/functions/sshtmp.fish @@ -10,14 +10,11 @@ function sshtmp --description "Connect to an SSH host using a temporary, one-tim set -l tmp_dir (mktemp -d) set -l key_path "$tmp_dir/id_ed25519" - try - ssh-keygen -t ed25519 -f "$key_path" -N "" -C "sshtmp temporary key for $destination" >/dev/null - command ssh -i "$key_path" \ - -o IdentitiesOnly=yes \ - -o StrictHostKeyChecking=no \ - -o UserKnownHostsFile=/dev/null \ - $destination - finally - rm -rf "$tmp_dir" - end + ssh-keygen -t ed25519 -f "$key_path" -N "" -C "sshtmp temporary key for $destination" >/dev/null + command ssh -i "$key_path" \ + -o IdentitiesOnly=yes \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + $destination + rm -rf "$tmp_dir" end