diff options
Diffstat (limited to 'scripts/debian_roll')
-rwxr-xr-x | scripts/debian_roll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/debian_roll b/scripts/debian_roll index e7ae1ff..83b7d76 100755 --- a/scripts/debian_roll +++ b/scripts/debian_roll @@ -28,3 +28,14 @@ lxc-attach -n $NAME -- bash -c 'echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_c lxc-attach -n $NAME -- bash -c 'echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config' lxc-attach -n $NAME -- bash -c 'echo "PermitRootLogin yes" >> /etc/ssh/sshd_config' lxc-attach -n $NAME -- systemctl restart sshd + +# setup networking +IP="$(lxc-info -n $NAME | grep IP | tr -s ' ' | cut -d ' ' -f 2)" +sshpass -p $ROOT_PASS ssh-copy-id -o "StrictHostKeyChecking=no" root@$IP +scp configs/$NAME/interfaces root@$IP:/etc/network/ +scp configs/hosts root@$IP:/etc/ +lxc-attach -n $NAME -- systemctl restart networking +ssh-keygen -R "$IP" + +IP="$(lxc-info -n $NAME | grep IP | tr -s ' ' | cut -d ' ' -f 2)" +sshpass -p $ROOT_PASS ssh-copy-id -o "StrictHostKeyChecking=no" root@$IP |