Commit 354c2ea7 authored by Leigh B Stoller's avatar Leigh B Stoller

Create an ssh config file for root, for ssh to switches.

I figure out how to get the switches to do ssh login, so not
you can just do "sudo ssh procurve1" instead of telnet.
parent b81402d7
......@@ -198,6 +198,28 @@ sub Install($$$)
};
}
#
# Create an ssh config file for root, to ssh to the switches.
# Need to also put root public key here tftp can get it.
#
my $SSHCONFIG = "/root/.ssh/config";
my $SSHPUBKEY = "/root/.ssh/id_rsa.pub";
my $COPYPUBKEY= "$TFTP_DIR/id_rsa.pub";
Phase "sshconfig", "Creating $SSHCONFIG", sub {
DoneIfExists($SSHCONFIG);
CreateFileFatal($SSHCONFIG,
"Host procurve1 procurve2",
"User manager",
"IdentitiesOnly yes",
"IdentityFile /root/.ssh/id_rsa");
ExecQuietFatal("$CHMOD 644 $SSHCONFIG");
};
Phase "sshpubkey", "Copying $SSHPUBKEY to $TFTP_DIR", sub {
DoneIfExists($COPYPUBKEY);
ExecQuietFatal("/bin/cp -p $SSHPUBKEY $COPYPUBKEY");
};
#
# This is the elabman SSL cert password.
#
......@@ -649,6 +671,8 @@ sub Install($$$)
Phase "chown", "Changing owner and group", sub {
ExecQuietFatal("$CHOWN -R elabman:emulab-ops ".
" $ELABMANDIR/emulab-devel");
ExecQuietFatal("$CHOWN -R -h elabman:emulab-ops ".
" $ELABMANDIR/emulab-devel");
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment