diff options
author | Karel Kočí <cynerd@email.cz> | 2018-08-26 19:29:22 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-08-26 19:31:07 +0200 |
commit | 408b7d005277e205f431e1b4eb256bbe836cba54 (patch) | |
tree | b430e751ccca3d6ea12f18f6b76f412da92ac516 | |
parent | 0d1aacddfe40a053a5e9774f561b9f64efe3592a (diff) | |
download | laminar-cnf-408b7d005277e205f431e1b4eb256bbe836cba54.tar.gz laminar-cnf-408b7d005277e205f431e1b4eb256bbe836cba54.tar.bz2 laminar-cnf-408b7d005277e205f431e1b4eb256bbe836cba54.zip |
Change how ssh access is configured
-rwxr-xr-x | ssh-hook.sh | 5 | ||||
-rw-r--r-- | ssh/authorized_keys (renamed from ssh_authorized_keys) | 0 | ||||
-rw-r--r-- | ssh/config | 9 | ||||
-rwxr-xr-x | templates/turris3x.run | 6 |
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 |