14 lines
297 B
Bash
14 lines
297 B
Bash
|
#! /usr/bin/env bash
|
||
|
|
||
|
set -Eeuo pipefail
|
||
|
set -x
|
||
|
|
||
|
# README.md /tmp/ files.l3d.ch files ./secret_ssh_key
|
||
|
printf "Add SSH Private Key"
|
||
|
mkdir ~/.ssh
|
||
|
chmod 700 ~/.ssh
|
||
|
mv $5 ~/.ssh/id_ed25519
|
||
|
chmod 400 ~/.ssh/id_ed25519
|
||
|
ssh-keyscan -t ed25519 $3 | tee -a ~/.ssh/known_hosts
|
||
|
rsync --progress $1 $4@$3:$2
|