-get_gpg_prng_arg >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf
-echo | monkeysphere-server gen-key --length 1024 --expire 0 testhost
-# remove the gpg.conf
-rm "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf
-
-HOSTKEYID=$( monkeysphere-server show-key | tail -n1 | cut -f3 -d\ )
-
-# certify it with the "Admin's Key".
+get_gpg_prng_arg >> "$MONKEYSPHERE_SYSCONFIGDIR"/host/gpg.conf
+echo | monkeysphere-host expert gen-key --length 1024 testhost
+
+# remove the host home for the next test
+rm -rf "$MONKEYSPHERE_SYSCONFIGDIR"/host
+
+# import host key
+echo "##################################################"
+echo "### testing host key importing..."
+ssh-keygen -b 1024 -t rsa -N '' -f "$TEMPDIR"/ssh_host_rsa_key
+monkeysphere-host expert import-key testhost < "$TEMPDIR"/ssh_host_rsa_key
+
+# change host key expiration
+echo "##################################################"
+echo "### setting host key expiration..."
+monkeysphere-host set-expire 1
+monkeysphere-host show-key
+# FIXME: how do we check that the expiration has really been set?
+
+echo "##################################################"
+echo "### getting host key fingerprint..."
+HOSTKEYID=$( monkeysphere-host show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )
+
+# certify host key with the "Admin's Key".