OpenSecurity/bin/create-cert-and-iso.sh
author dyle@opensecurity.d03.arc.local
Wed, 29 Jan 2014 09:23:52 +0000
changeset 53 01839f13cef3
child 240 d7ef04254e9c
permissions -rw-r--r--
SSH cert and ISO creation with shadowrun.exe
dyle@53
     1
#!/bin/sh
dyle@53
     2
dyle@53
     3
# create a ssh-key pair in the current folder
dyle@53
     4
# and create a ISO image with it
dyle@53
     5
dyle@53
     6
VM_NAME=$(basename "$(pwd)")
dyle@53
     7
echo ${VM_NAME}
dyle@53
     8
dyle@53
     9
mkdir .ssh &> /dev/null
dyle@53
    10
ssh-keygen -q -t rsa -N "" -C "${VM_NAME}" -f dvm_key &> /dev/null
dyle@53
    11
chmod 500 dvm_key
dyle@53
    12
mv dvm_key.pub .ssh/authorized_keys
dyle@53
    13
genisoimage -J -R -o "${VM_NAME}.iso" .ssh
dyle@53
    14