#!/bin/sh describe="setup ssh" apply() { [ -e "$HOME/.ssh/authorized_keys" ] || ln files/authorized_keys $HOME/.ssh/authorized_keys [ -e "$HOME/.ssh/config" ] || ln files/config $HOME/.ssh/config if ! [ -f "$HOME/.ssh/id_rsa" ]; then echo "Creating new ssh key for this device..." ssh-keygen -f $HOME/.ssh/id_rsa -p "" -q echo "Adding key to authorized_keys..." cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/authorized_keys fi } undo() { echo "Undoing ssh keys is not supported, please do this manually." }