summaryrefslogtreecommitdiff
path: root/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'setup.sh')
-rwxr-xr-xsetup.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/setup.sh b/setup.sh
index 5661b0f..f9d16fc 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,18 +1,27 @@
1#!/bin/bash 1#!/bin/bash
2 2
3curl -L public.0nom.ch/pubkeys >> ~/.ssh/authorized_keys
4echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config 3echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config
5echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config 4echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config
6echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config 5echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config
7 6
7sudo dnf install -y git
8git clone https://git.0nom.ch/keys ~/
9mkdir -p "~/.ssh"
10touch "~/.ssh/authorized_keys"
11find "~/keys" -name "*.pub" -type f -print0 | while IFS= read -r -d '' file; do
12 echo "Adding key from file: $file"
13 cat "$file" >> "~/.ssh/authorized_keys"
14 echo "" >> "~/.ssh/authorized_keys" # Add a newline after each key
15done
16
8#install packages 17#install packages
9sudo dnf install -y epel-release dnf-utils 18sudo dnf install -y epel-release dnf-utils
10sudo dnf install -y nc autossh tmux htop tar bmon gzip tree wget curl mlocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools iptables usbutils yum 19sudo dnf install -y nc openssl autossh tmux htop tar bmon gzip tree wget curl mlocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools usbutils yum
11#sudo yum install -y python3-openstackclient s3fs-fuse awscli 20#sudo yum install -y python3-openstackclient s3fs-fuse awscli
12#pip install jupyterlab python-swiftclient 21#pip install jupyterlab python-swiftclient
13sudo dnf update -y 22sudo dnf update -y
14 23
15cat << EOF > /etc/vimrc 24cat << EOF >> /etc/vimrc
16augroup netcat_clipboard 25augroup netcat_clipboard
17 au! 26 au!
18 au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.0nom.ch 5023", @") 27 au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.0nom.ch 5023", @")
@@ -23,12 +32,15 @@ set wrap
23 32
24" Optional: Make wrapped lines easier to read by indenting them 33" Optional: Make wrapped lines easier to read by indenting them
25set breakindent 34set breakindent
26set breakindentopt=shift:2 35set breakindentopt=shift:3
27 36
28set list
29set listchars=tab:>-
30set autoindent 37set autoindent
31set number 38set number
39set mouse=a
40set expandtab
41set shiftwidth=2
42set softtabstop=2
43set tabstop=2
32EOF 44EOF
33 45
34# add check fro each component 46# add check fro each component