Endlessh is an SSH tarpit to keep the automated bots hitting port 22 locked up, and waste script kiddies time.
You can either get it from your package manager with
sudo apt install endless, or build from source. To build, ensure you have
libc6-dev installed, then
git clone [email protected]:skeeto/endlessh.git,
make, and move it to your path-
sudo mv endlessh /usr/local/bin/.
Move the service to systemd,
sudo cp util/endlessh.service /etc/systemd/system, and enable it
sudo systemctl enable endlessh. Next, specify the configuration
mkdir /etc/endlessh and
sudo vim /etc/endlessh/config
Add your desired config, e.g.
If you're using a low port number, ensure you update the
AmbientCapabilities=CAP_NET_BIND_SERVICE, and run
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/endlessh.
sudo systemctl start endlessh to start the service, you should now see the service running on your specified port when you run
netstat -tulpn | grep endlessh. If you need to check the logs, run
sudo journalctl -u endlessh