summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xssh-hook.sh5
-rw-r--r--ssh/authorized_keys (renamed from ssh_authorized_keys)0
-rw-r--r--ssh/config9
-rwxr-xr-xtemplates/turris3x.run6
4 files changed, 15 insertions, 5 deletions
diff --git a/ssh-hook.sh b/ssh-hook.sh
index 67130a5..4aac748 100755
--- a/ssh-hook.sh
+++ b/ssh-hook.sh
@@ -7,8 +7,9 @@ if [ -z "$SSH_ORIGINAL_COMMAND" ]; then
git fetch --prune --force
git reset --hard origin/master
- echo "Deploy authorized keys"
- cp ssh_authorized_keys ~/.ssh/authorized_keys
+ echo "Deploy ssh configuration"
+ cp ssh/config ~/.ssh/config
+ cp ssh/authorized_keys ~/.ssh/authorized_keys
else
diff --git a/ssh_authorized_keys b/ssh/authorized_keys
index 9b1abb0..9b1abb0 100644
--- a/ssh_authorized_keys
+++ b/ssh/authorized_keys
diff --git a/ssh/config b/ssh/config
new file mode 100644
index 0000000..5e0493b
--- /dev/null
+++ b/ssh/config
@@ -0,0 +1,9 @@
+# vim: ft=sshconfig
+
+Host *
+ StrictHostKeyChecking no
+
+Host upload
+ User upload
+ Hostname cynerd.cz
+ IdentityFile ~/upload.ssh.key
diff --git a/templates/turris3x.run b/templates/turris3x.run
index d3cc5bc..3fa1859 100755
--- a/templates/turris3x.run
+++ b/templates/turris3x.run
@@ -29,10 +29,10 @@ echo_stage "Sign"
./staging_dir/host/bin/usign -S -s ~/openwrt-repo.key -m "bin/$ARCH/packages/base/Packages"
echo_stage "Deploy"
-ssh -i ~/upload.ssh.key upload@cynerd.cz rm -rf "deploy-turris3x-$BOARD"
-scp -i ~/upload.ssh.key -r "bin/$ARCH/packages/base" upload@cynerd.cz:deploy-turris3x-$BOARD
+ssh upload rm -rf "deploy-turris3x-$BOARD"
+scp -r "bin/$ARCH/packages/base" upload:deploy-turris3x-$BOARD
exit 0 # Disable deploy for now
-ssh -i ~/upload.ssh.key upload@cynerd.cz /bin/sh -ex <<EOF
+ssh upload /bin/sh -ex <<EOF
rm -rf /var/www/repo/turris3x
mv deploy-turris3x-$BOARD /var/www/repo/turris3x/$BOARD
EOF