install-server: Explicitly disable ControlMaster for the initial ssh

If you use persistent ssh connections, ssh'ing as admin will cause a sshd
process to hang around on the server, preventing us from deleting the admin
account.  Therefore, we disable persistent connections for that ssh connection.

(imported from commit 2d043768417d20ef2f12695475a20b74bf3374de)
This commit is contained in:
Zev Benjamin
2013-11-23 11:41:22 -05:00
parent dacf97db48
commit 87632c6526

View File

@@ -34,7 +34,7 @@ SSH_OPTS="-o HostKeyAlgorithms=ssh-rsa"
set +e
ssh $SSH_OPTS "$server" -t -i "$amazon_key_file" -ladmin <<EOF
ssh $SSH_OPTS "$server" -t -i "$amazon_key_file" -ladmin -o "ControlMaster=no" <<EOF
sudo sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
sudo mkdir ~root/.ssh && sudo cp .ssh/authorized_keys ~root/.ssh/authorized_keys
sudo service ssh restart