Create a template service file at
/etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name
of target host:
[Unit] Description=Setup a secure tunnel to %I After=network.target
Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.
Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.
Login with default username: alarm, password: alarm
#Optionally enable root over SSH. The rest of these instructions assume u are in root.
curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z yum install p7zip 7za e 2012-07-15-wheezy-raspian-minimal.img.7z qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
This gist assumes: