Skip to content

Commit

Permalink
Merge pull request #48 from matelakat/fix-dom0-auth
Browse files Browse the repository at this point in the history
Fix domzero's access
  • Loading branch information
matelakat committed Jan 21, 2014
2 parents 8cb8155 + adb3699 commit 9100e27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xenapi-in-rs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,17 @@ auto eth2
EOF
} | run_on_appliance "sudo tee /etc/network/interfaces"

tmpdomzerokey=$(mktemp)

# Enable domzero user to log in to dom0
run_on_appliance cat /home/domzero/.ssh/id_rsa.pub > $tmpdomzerokey

# Update ssh keys and reboot, so settings applied
{
cat /root/.ssh/authorized_keys
} | run_on_appliance "sudo tee /root/.ssh/authorized_keys && sudo reboot"

# Enable domzero user to log in to dom0
run_on_appliance cat /home/domzero/.ssh/id_rsa.pub | tee -a /root/.ssh/authorized_keys
cat $tmpdomzerokey >> /root/.ssh/authorized_keys
}

function configure_appliance() {
Expand Down

0 comments on commit 9100e27

Please sign in to comment.