PatchInventory: 02-enable-ssh

File 02-enable-ssh, 1.2 kB (added by admin, 3 years ago)

02-enable-ssh

Line 
1#!/bin/bash
2# Copyright (C) 2009 Maxence Dunnewind
3#
4# This file is part of the ganeti customisation scripts
5#
6# This program is free software; you can redistribute it and/or modify it
7# under the terms of the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any
9# later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
19#
20mkdir $TARGET/root/.ssh
21chmod 600 $TARGET/root/.ssh
22
23wget http://dachary.org/loic/id_rsa.pub  -O - >> $TARGET/root/.ssh/authorized_keys
24wget http://people.dunnewind.net/maxence/idrsa.pub  -O - >> $TARGET/root/.ssh/authorized_keys
25wget http://trac.fsffrance.vm.gnt/raw-attachment/ticket/18/id_rsa.pub -O - >> $TARGET/root/.ssh/authorized_keys
26sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication no/' $TARGET/etc/ssh/sshd_config