forked from skeeto/endlessh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.txt
28 lines (23 loc) · 1.12 KB
/
setup.txt
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
cd ~/to-install/endlessh (path-to-this-git-clone/endlessh)
sudo apt install libc6-dev gcc make
make (exec in root of this git folder)
sudo mv endlessh /usr/local/bin
which endlessh
sudo cp endlessh.service /etc/systemd/system
sudo systemctl enable endlessh
sudo mkdir -p /etc/endlessh
cd /etc/endlessh
sudo curl https://raw.githubusercontent.com/sunstep/endlessh/master/config --output config
sudo systemctl start endlessh
#Test if it is listening to port 22
sudo netstat -tulpn | grep endlessh
# Manual steps for fixing port <1024 not working. Not necessary if using the steps above.
Echo "Endlessh not bound to port 22, fixing it now."
cd /etc/systemd/system/
sudo mv endlessh.service endlessh.service.backup
sudo curl https://raw.githubusercontent.com/sunstep/endlessh/master/endlessh.service --output endlessh.service
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/endlessh
sudo systemctl daemon-reload && sudo systemctl restart endlessh
sudo netstat -tulpn | grep endlessh
Echo "Port should now be listening to port 22, if not manually fix it."
Echo "If endlessh is listening to port 22, the set up should be complete now."