A simple server to spawn SSH tunnels when servers are starting, and close them when servers are stopping on a pterodactyl node.
Support for UDP will be added in the future, however currently it only supports TCP through SSH tunnels.
mvn clean compile assembly:single
- Clone the repository
- Install java 11 and maven (
apt install openjdk-11-jre-headless mvn
) - Build the server (
cd pssht && mvn clean compile assembly:single
) - Open crontab
crontab -e
- Insert
@reboot screen -S pssht_server -dm bash -c "cd ~/PSSHT_LOCATION/target/ && java -jar pterodactylAPI-ssh-tunnels-1.0-SNAPSHOT-jar-with-dependencies.jar"
- Reboot
A screen called pssht_server with pssht running inside of it should now be running.
This server should be installed on a server which has access to the pterodactyl node(s). An obvious place would be the node itself.
Once you run the server once, it creates a config.properties
file. Edit this to your suite needs. Make sure to copy SSH keys for the user tunnel-user
on the server tunnel-remote
.
This can be done with 2 easy steps:
ssh-keygen -t rsa
(if no ssh keys exist on the server yet)ssh-copy-id tunnel-user@tunnel-remote
(copy the ssh key)
Now run the server, and it should work automagically.