#!/bin/bash
# Copyright (C) 2009 Maxence Dunnewind
#
# This file is part of the ganeti customisation scripts 
#
# This program is free software; you can redistribute it and/or modify it 
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
#
mkdir $TARGET/root/.ssh
chmod 600 $TARGET/root/.ssh

wget http://dachary.org/loic/id_rsa.pub  -O - >> $TARGET/root/.ssh/authorized_keys
wget http://people.dunnewind.net/maxence/idrsa.pub  -O - >> $TARGET/root/.ssh/authorized_keys
wget http://trac.fsffrance.vm.gnt/raw-attachment/ticket/18/id_rsa.pub -O - >> $TARGET/root/.ssh/authorized_keys
sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication no/' $TARGET/etc/ssh/sshd_config

