Created
June 28, 2024 20:35
-
-
Save LamberKeep/8788cd93bb044f919ca4148b47f3c5d8 to your computer and use it in GitHub Desktop.
Minecraft RCON connection via SSH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RCON is BAD, don't open this port! There no security for your server! | |
# Instead of this, use SSH: | |
# 1. Install on the server mcrcon by Tiiffi (https://github.com/Tiiffi/mcrcon). | |
# 2. Set environment variables as $MCRCON_HOST, $MCRCON_PORT and $MCRCON_PASS. | |
# 3. Use next script... | |
ssh $MCRCON_HOST mcrcon -H localhost -P $MCRCON_PORT -p $MCRCON_PASS $@ | |
# You also can create command alias in .bashrc: | |
alias ssh2rcon='ssh $MCRCON_HOST mcrcon -H localhost -P $MCRCON_PORT -p $MCRCON_PASS' | |
# This script has been tested and works as intended. | |
# Example: | |
# $ sh ssh2rcon.sh help |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment