forked from skeeto/endlessh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
35 lines (26 loc) · 951 Bytes
/
install.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
29
30
31
32
33
34
35
#!/bin/zsh
# Install required dependencies
sudo apt install libc6-dev gcc make curl net-tools -y
# Build endlessh
make
# Move the endlessh binary to the appropriate location
echo "Moving endlessh to /usr/local/bin..."
sudo mv endlessh /usr/local/bin
# Verify the installation
which endlessh
# Copy the endlessh systemd service file
echo "Copying endlessh.service to /etc/systemd/system"
sudo cp endlessh.service /etc/systemd/system
# Enable the endlessh service
echo "Enabling endlessh..."
sudo systemctl enable endlessh
# Create the configuration file
echo "Creating /etc/endlessh directory..."
sudo mkdir -p /etc/endlessh
echo "Downloading custom endlessh service..."
sudo curl https://raw.githubusercontent.com/sunstep/endlessh/master/config --output /etc/endlessh/config
# Start the endlessh service
echo "Starting Endlessh..."
sudo systemctl start endlessh
# Check if endlessh is listening on port 22
sudo netstat -tulpn | grep endlessh