-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
809f2ab
commit 47a04f6
Showing
5 changed files
with
81 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# setup | ||
sudo echo 'jrpi' > /etc/hostname | ||
|
||
# apps | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
fail2ban \ | ||
kodi \ | ||
ufw \ | ||
vim | ||
|
||
# ufw | ||
sudo ufw allow ssh | ||
sudo ufw default deny incoming | ||
sudo ufw default allow outgoing | ||
sudo ufw enable | ||
sudo ufw status verbose | ||
|
||
# ssh | ||
mkdir -p ~/.ssh | ||
if [ ! -f ~/.ssh/authorized_keys ]; then | ||
curl https://raw.githubusercontent.com/jessie-ross/dot-files/main/public-keys/id_ed25519_20240608.pub >> ~/.ssh/authorized_keys | ||
fi | ||
|
||
|
||
echo <<SSHD_CONFIG > /etc/ssh/sshd_config | ||
PermitRootLogin no | ||
PubkeyAuthentication yes | ||
PasswordAuthentication no | ||
PermitEmptyPasswords no | ||
KbdInteractiveAuthentication no | ||
UsePAM no | ||
X11Forwarding no | ||
PrintMotd no | ||
AcceptEnv LANG LC_* | ||
Subsystem sftp internal-sftp | ||
SSHD_CONFIG | ||
|
||
sudo systemctl enable sshd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters