summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dyndns.ssh-rsa.cryptonomic.net13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dyndns.ssh-rsa.cryptonomic.net b/src/dyndns.ssh-rsa.cryptonomic.net
new file mode 100755
index 0000000..824f0b9
--- /dev/null
+++ b/src/dyndns.ssh-rsa.cryptonomic.net
@@ -0,0 +1,13 @@
1#!/bin/sh
2self=${0##*/}
3keytype=${self#dyndns.}
4keytype=${keytype%%.*}
5
6case "$keytype" in
7 ssh-dss) keyfilename=dsa ;;
8 ecdsa-sha2-nistp256) keyfilename=ecdsa ;;
9 ssh-rsa|ssh-ed25519) keyfilename=${keytype#ssh-} ;;
10 *) exit 1 ;;
11esac
12
13sudo ssh -i /etc/ssh/ssh_host_${keyfilename}_key "$@" dyndns@cryptonomic.net