diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/dyndns.ssh-rsa.cryptonomic.net | 13 |
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 | ||
2 | self=${0##*/} | ||
3 | keytype=${self#dyndns.} | ||
4 | keytype=${keytype%%.*} | ||
5 | |||
6 | case "$keytype" in | ||
7 | ssh-dss) keyfilename=dsa ;; | ||
8 | ecdsa-sha2-nistp256) keyfilename=ecdsa ;; | ||
9 | ssh-rsa|ssh-ed25519) keyfilename=${keytype#ssh-} ;; | ||
10 | *) exit 1 ;; | ||
11 | esac | ||
12 | |||
13 | sudo ssh -i /etc/ssh/ssh_host_${keyfilename}_key "$@" dyndns@cryptonomic.net | ||