buildwatcher/bin/buildwatcher_ssh_setup

13 lines
268 B
Bash

#!/bin/bash
set -e
if [ ! -d ~/.ssh ]; then
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa -b 4096 -N "" -q -f ~/.ssh/id_rsa
ssh-keyscan localhost >> ~/.ssh/known_hosts
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
fi