summaryrefslogtreecommitdiff
path: root/src/share/mh/import_key
diff options
context:
space:
mode:
authorMatt Goins <mjgoins@openflows.com>2009-02-21 16:54:39 -0500
committerMatt Goins <mjgoins@openflows.com>2009-02-21 16:54:39 -0500
commit4e0502a242b89c73535b00cc1b199dfea38ce4d4 (patch)
tree6bed970da1f85171b1c0b13095b702825a90754b /src/share/mh/import_key
parentd41fe28eb49e42d7773a223a43fd108913410c99 (diff)
parenteb88374be90344d1808fe49a5bc69a547a09280d (diff)
Merge branch 'master' of git://lair.fifthhorseman.net/~dkg/monkeysphere
Diffstat (limited to 'src/share/mh/import_key')
-rw-r--r--src/share/mh/import_key15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/share/mh/import_key b/src/share/mh/import_key
index 040b41c..f7c69c3 100644
--- a/src/share/mh/import_key
+++ b/src/share/mh/import_key
@@ -26,20 +26,9 @@ if [ -z "$sshKeyFile" ] ; then
failure "Must specify ssh key file to import, or specify '-' for stdin."
fi
-# use the default hostname if not specified
+# fail if hostname not specified
if [ -z "$hostName" ] ; then
- hostName=$(hostname -f) || failure "Could not determine hostname."
- # test that the domain is not obviously illegitimate
- domain=${foo##*.}
- case $domain in
- 'local'|'localdomain')
- failure "Host domain '$domain' is not legitimate. Aborting key import."
- ;;
- esac
- # test that there are at least two parts
- if (( $(echo "$hostName" | tr . ' ' | wc -w) < 2 )) ; then
- failure "Host name '$hostName' is not legitimate. Aborting key import."
- fi
+ failure "You must specify a fully-qualified domain name for use in the host certificate user ID."
fi
userID="ssh://${hostName}"