projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the monkeysphere header to have 2009 copyright year and add my name
[monkeysphere.git]
/
src
/
subcommands
/
mh
/
import-key
diff --git
a/src/subcommands/mh/import-key
b/src/subcommands/mh/import-key
index c33550b08f05ecef4b347c5a4d823728ebb93fb0..9ba51d24dfb26f99c1d9b600784ba5311ba56ab9 100755
(executable)
--- a/
src/subcommands/mh/import-key
+++ b/
src/subcommands/mh/import-key
@@
-10,6
+10,8
@@
# They are Copyright 2008, and are all released under the GPL, version 3
# or later.
# They are Copyright 2008, and are all released under the GPL, version 3
# or later.
+import_key() {
+
local hostName=$(hostname -f)
local keyFile="/etc/ssh/ssh_host_rsa_key"
local keyExpire
local hostName=$(hostname -f)
local keyFile="/etc/ssh/ssh_host_rsa_key"
local keyExpire
@@
-23,10
+25,6
@@
fingerprint_server_key >/dev/null \
# get options
while true ; do
case "$1" in
# get options
while true ; do
case "$1" in
- -h|--hostname)
- hostName="$2"
- shift 2
- ;;
-f|--keyfile)
keyFile="$2"
shift 2
-f|--keyfile)
keyFile="$2"
shift 2
@@
-40,6
+38,9
@@
while true ; do
failure "Unknown option '$1'.
Type '$PGRM help' for usage."
fi
failure "Unknown option '$1'.
Type '$PGRM help' for usage."
fi
+ hostName="$1"
+ shift
+ ;;
break
;;
esac
break
;;
esac
@@
-82,4
+83,6
@@
gpg_authentication "--export-options export-minimal --armor --export 0x${fingerp
log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pub.gpg"
# show info about new key
log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pub.gpg"
# show info about new key
-show_server_key
+show_key
+
+}