diff options
| -rw-r--r-- | port-forward/ssh-port-forward.sh | 14 | ||||
| -rw-r--r-- | setup.sh | 15 |
2 files changed, 18 insertions, 11 deletions
diff --git a/port-forward/ssh-port-forward.sh b/port-forward/ssh-port-forward.sh new file mode 100644 index 0000000..5a0d955 --- /dev/null +++ b/port-forward/ssh-port-forward.sh | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | j=$1 | ||
| 4 | HOST="p.0nom.ch" | ||
| 5 | KEY_FILE="m" | ||
| 6 | |||
| 7 | # get the process holding the specified port and kill it | ||
| 8 | echo "cleaning management port..." | ||
| 9 | ssh -i "$KEY_FILE" "$HOST" "ss -tunlp | grep :${j}022 | awk '{print $NF}' | sed 's/.*pid=\([^,]*\).*/\1/' | head -n1 | xargs kill -9" | ||
| 10 | echo "cleaning attempted." | ||
| 11 | |||
| 12 | j=6; ssh -i m sg1.0nom.ch $(for i in $(seq ${j}000 ${j}005); do echo "-R $i:localhost:$i"; done; echo "-R ${j}022:localhost:22") | ||
| 13 | |||
| 14 | #seperate all the files | ||
| @@ -8,12 +8,12 @@ echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config | |||
| 8 | #install packages | 8 | #install packages |
| 9 | sudo dnf install -y epel-release dnf-utils | 9 | sudo dnf install -y epel-release dnf-utils |
| 10 | sudo 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 | 10 | sudo 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 |
| 11 | sudo yum install -y python3-openstackclient s3fs-fuse awscli | 11 | #sudo yum install -y python3-openstackclient s3fs-fuse awscli |
| 12 | pip install jupyterlab python-swiftclient | 12 | #pip install jupyterlab python-swiftclient |
| 13 | sudo dnf update -y | 13 | sudo dnf update -y |
| 14 | 14 | ||
| 15 | #install nvim | 15 | #install nvim |
| 16 | sudo dnf groupinstall "Development Tools" | 16 | sudo dnf groupinstall -y "Development Tools" |
| 17 | sudo dnf install -y cmake | 17 | sudo dnf install -y cmake |
| 18 | cd ~ | 18 | cd ~ |
| 19 | git clone https://github.com/neovim/neovim | 19 | git clone https://github.com/neovim/neovim |
| @@ -56,14 +56,7 @@ vim.api.nvim_create_autocmd("BufWritePost", { | |||
| 56 | }) | 56 | }) |
| 57 | EOF | 57 | EOF |
| 58 | 58 | ||
| 59 | #install font for lvim | 59 | |
| 60 | curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz | ||
| 61 | mkdir JetBrainsMono | ||
| 62 | tar -xvf JetBrainsMono.tar.xz -C JetBrainsMono | ||
| 63 | mkdir -p ~/.local/share/fonts | ||
| 64 | mv JetBrainsMono/*.ttf ~/.local/share/fonts/ | ||
| 65 | fc-cache -f -v | ||
| 66 | rm -rf JetBrainsMono | ||
| 67 | 60 | ||
| 68 | 61 | ||
| 69 | # add check fro each component | 62 | # add check fro each component |
