delinit_files/debinit

21 lines
611 B
Plaintext
Raw Permalink Normal View History

2022-01-03 05:57:59 -05:00
#!/bin/bash
###########################################################################
#
# Simple script to install openssh server and setup the root user for
# remote ssh access from my account. This enables the target host for
# ansible management.
#
###########################################################################
apt -y install openssh-server
apt -y install python3
echo "PermitRootLogin prohibit-password" >>/etc/ssh/sshd_config
2023-05-21 22:07:45 -04:00
systemctl restart ssh
2022-01-03 05:57:59 -05:00
mkdir /root/.ssh
chmod 700 /root/.ssh
curl http://delinit.lan/ssh-keys -o /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys