-
Notifications
You must be signed in to change notification settings - Fork 122
/
drop.sh
28 lines (26 loc) · 768 Bytes
/
drop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
clear
dropport=222
echo -e "\nPlease input DropBear Port."
printf "Default Port is \e[33m${dropport}\e[0m, let it blank to use this Port: "
read dropporttmp
if [[ -n "${dropporttmp}" ]]; then
dropport=${dropporttmp}
fi
sudo apt update -y
sudo apt install dropbear -y
cat > /etc/default/dropbear << ENDOFFILE
NO_START=0
DROPBEAR_PORT=$dropport
DROPBEAR_EXTRA_ARGS=""
DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"
DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
DROPBEAR_ECDSAKEY="/etc/dropbear/dropbear_ecdsa_host_key"
DROPBEAR_RECEIVE_WINDOW=65536
ENDOFFILE
sudo chmod 646 /etc/default/dropbear
sudo ufw allow $dropport
sudo systemctl restart dropbear
sudo systemctl enable dropbear
clear
echo "DROPBEAR Installed As Port : $dropport"