this plugin for spigot creates ssh tunnel between server that contains a service that you will like to link without exposing on the internet
Go to file
Govindas a7af039799 Document SSH key setup 2022-08-30 17:55:10 +00:00
src/main added a comment 2022-06-17 06:47:01 +04:00
.gitignore finish! 2022-01-31 03:34:33 +04:00
README.md Document SSH key setup 2022-08-30 17:55:10 +00:00
pom.xml Use Java 8 instead of Java 17 for compatibility 2022-03-23 12:47:54 +02:00

README.md

Warning

before using the plugin those steps were made on a linux machine not sure about windows but those might work on any unix system like bsd or freebsd

And also this was made for shared hosting only, not meant on dedicated as you control the operating system

How to setup on |ssh server in linux|

  • create user in your system using the command provided below

    useradd appletunnel --shell=/bin/true

    this will make the user have no shell + sftp and scp access.

  • Create SSH key for the user:

  • Login into the created user
  • Execute ssh-keygen
  • Leave the passphrase empty during ssh key creation
  • Append ~/.ssh/id_rsa.pub contents to ~/.ssh/authorized_keys file, if authorized_keys file does not exist, create it
  • there will be issue that user can't login to fix this add /bin/true to /etc/shells

  • start your minecraft server with the plugin installed. but you will notice that it will not load the plugins as shown down below.

    [09:16:17 WARN]: [AppleTunneler] no Identities files found, please put them in plugins/AppleTunneler/Identities
    [09:16:17 ERROR]: Error occurred while enabling AppleTunneler v1.0-SNAPSHOT (Is it up to date?)
    
  • put your created user's private key in plugins/AppleTunneler/Identities folder

  • start server again, but you will be met with another error as shown below

      [09:20:16 ERROR]: [AppleTunneler] FILE at path: /home/test/Desktop/test-server/plugins/AppleTunneler/.known_hosts Does not exists
      [09:20:16 ERROR]: Error occurred while enabling AppleTunneler v1.0-SNAPSHOT (Is it up to date?)
      java.lang.RuntimeException: Known host file does not exists in plugin folder
    

    as you can see the error created path for us which will be easy for us to create the file, now copy the path.

  • run this command to create the host file ssh-keyscan limework.net >> /home/test/Desktop/test-server/plugins/AppleTunneler/.known_hosts

  • now modify the config of the plugins for your needs by setting host, port, username of ssh server and setting tunneling needed.

and done.