cleanup for the specialaccounts nodemanager plugin:
[myplc.git] / plc.d / ssh
index 1cc3ac1..db47023 100755 (executable)
--- a/plc.d/ssh
+++ b/plc.d/ssh
@@ -1,4 +1,6 @@
 #!/bin/bash
+# $Id$
+# $URL$
 #
 # priority: 600
 #
@@ -7,16 +9,17 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: ssh,v 1.1 2006/04/06 21:51:59 mlhuang Exp $
+# $Id$
 #
 
 # Source function library and configuration
 . /etc/plc.d/functions
 . /etc/planetlab/plc_config
 
+# Be verbose
+set -x
+
 # XXX Could make these configurable
-KEY_TYPE_ROOT=rsa
-KEY_LEN_ROOT=1024
 KEY_TYPE_DEBUG=rsa
 KEY_LEN_DEBUG=2048     
 
@@ -27,15 +30,6 @@ case "$1" in
 
        tmp=$(mktemp -d /tmp/ssh.XXXXXX)
 
-       # Generate root SSH key
-       if [ ! -f $PLC_ROOT_SSH_KEY_PUB -o ! -f $PLC_ROOT_SSH_KEY ] ; then
-           ssh-keygen -N "" -C "$PLC_NAME Central <$PLC_MAIL_SUPPORT_ADDRESS>" \
-               -b $KEY_LEN_ROOT -t $KEY_TYPE_ROOT -f $tmp/root
-           check
-           install -D -m 600 $tmp/root $PLC_ROOT_SSH_KEY
-           install -D -m 644 $tmp/root.pub $PLC_ROOT_SSH_KEY_PUB
-       fi
-
        # Generate debug SSH key
        if [ ! -f $PLC_DEBUG_SSH_KEY_PUB -o ! -f $PLC_DEBUG_SSH_KEY ] ; then
            ssh-keygen -N "" -C "$PLC_NAME Central <$PLC_MAIL_SUPPORT_ADDRESS>" \