Inactive [ADMN] MCTelnet v1.2.7 - Remote Console Access using Telnet [1185]

Discussion in 'Inactive/Unsupported Plugins' started by bekvon, Feb 21, 2011.

  1. Offline

    bekvon

    MCTelnet - A telnet server plugin for bukkit.
    Current Version: v1.2.7

    First off, this is not a wrapper, its a simple plugin. Plop it into your plugins folder, tweak the config file and your good to go.

    Features:
    • Ability to access the server console from telnet.
    • Requires username + password on connect.
    • Port can be specified in config.yml
    • Additional users with different permissions can be set up.
    • Passwords can be encrypted in the config file (md5).
    • Contains a "sudo" command that will elevate you to the root user.
    Configuration:
    Sample Config File:
    Code:
    #Setup information
    encryptPasswords: true
    listenAddress: 0.0.0.0
    telnetPort: 8765
    allowAuthlessLocalhost: false
    #Root login information
    rootUser: console
    rootPass: abcd
    rootEncrypted: false
    #Other users
    users:
        bekvon:
            log: true
            password: abcd
            commands: list, plugman, help
            passEncrypted: false
    
    Instructions by ScorchRaserik:
    Todo:
    • Possibly implementing usernames to log on with. Done
    • Possible Integration into Permissions. Not really possible right now.
    • Make config file write default values if missing. Done
    • Code cleanup
    • Make passwords hidden as you type (almost done).Done
    • Optional idle-timeout.
    • Sudo command (similar to linux). Done
    • Encrypt passwords in the config. Done
    Change Log:
    v1.2.7 - 9/23/2011
    - Fix chat color codes being printed on console.


    Change log (open)

    v1.2.6 - 8/16/2011
    - Fixed to work with CB 1060.

    v1.2.4 - 4/11/2011
    - Allowed periods to be used.

    v1.2.2 - 3/19/2011
    - Added ability to specify a listen address.
    - Rebuilt with latest CB (556)

    v1.2.1 - 2/28/2011
    - Rebuilt against latest recommended craftbukkit build (440 as of now).
    - Changed to static download link.

    v1.2 - 2/24/2011
    - Added sudo command.
    - Passwords will now be setup to be encrypted in the config file.
    - Passwords are now hidden as you type.
    - Other minor improvements.

    v1.1 - 2/22/2011
    - Added usernames, can now specify users and what commands they can use.
    - Cleaner config file with more information.
    - Missing config file is regenerated.
    - Many aesthetic improvements.

    v1.0 - 2/21/2011
    - Initial Release.


    Downloads
    File: MCTelnet
    Configuration File: config.yml
    Recommended Telnet Client: PuTTY

    Source: GitHub
     
    kittenchunks, umnumnum, sbeex and 7 others like this.
  2. Offline

    Dr_Herbalist

  3. Offline

    bekvon

    Updated to v1.1, many improvements, see the change log :)
     
  4. Offline

    SoapFlakes

    Interesting. Will try out.
     
  5. Offline

    KingofTown

    Works great. Thank you!
     
  6. Offline

    bekvon

    Updated to 1.2, more new stuff :)
     
  7. Offline

    Epiktetus

    Awesome, that's exactly what I was looking for. Thank you.. and it works even. :)
     
  8. Offline

    Peva

    its not working for me on ubuntu, I can access my Telnet normally threw port 23, but i can't get it threw 8765, even when forwarded. This mod does work when the server is hosted on windows, but not when i host the server on Ubuntu. Any ideas?

    [INFO] [MCTelnet] - Starting Up! Version: 1.2.1 by bekvon
    [SEVERE] [MCTelnet] - Unable to Enable! Error: Permission denied
     
  9. Offline

    bekvon

    Im not 100% sure, but its quite likely that whatever account your using to run the server doesn't have correct permissions to open the network port for some reason. It could also be that something else is running on port 8765, although I find that unlikely. Just for testing purposes, can you try running the server with the Linux root account (or by prepending "sudo" onto your launch command). Also try a higher port, something like 54321.
     
  10. Offline

    Highsight

    It's a really great plugin, but is there any way you can encrypt the typing when I am typing in my password? Seems like a real downfall of the program... :S
     
  11. Offline

    bekvon

    Unfortunately, there is no way to directly encrypt Telnet connections. I was thinking about trying to make a SSH plugin, but I don't quite know exactly how much work it would be and what all it would entail. One thing you can do to encrypt your Telnet connection is to set up a VPN Server so that you can Telnet across the VPN link. VPN's are very secure, and encrypt all traffic that flows across them.
     
  12. Offline

    bekvon

    This has been tested and works fine under CB 493.
     
  13. Offline

    mickael9

    Hi, could you add an option to specify the bind address ?
    I'd like this to bind on localhost instead of all interfaces, so I can use it for my web frontend internally.
     
  14. Offline

    jacksonm1234

    I installed MCTelnet a couple days ago on my rented server. Last night while I was playing MC, I also had the console open via Putty, and out of nowhere, my console said something like "[MCTelnet] - Client connected: 67.xxx.xxx.xxx". About 5-10 minutes after I saw that, it said, "client disconnected".

    The IP address it showed was not mine. Who/what connected to my instance of MCTelnet? Is this program secure?
     
  15. Offline

    bekvon

    Even if a client connected, that doesn't mean they necessarily were able to log in. As for security, Telnet by nature is not secure if your using it over the internet. If you do use it over the internet, I recommend doing it through a encrypted VPN (Hamachi is a simple, good free vpn if your using Windows). Only other thing I can think of is that you were hit by some random port scanner thing that was being directed at you. I will add a message for when someone actually manages to log in when I get time.
     
  16. Offline

    ScorchRaserik

    I'm running a server from my desktop and I can't seem to log in to my own connection from my laptop. The console connects to the server just fine, but everytime I type in my username and password, it says "Invalid Username/password"

    Here's my config:
    Code:
    rootUser: scorch
    consoletelnetPort: 25562
    rootPass: 88
    rootEncrypted: true
    encryptPasswords: true
    telnetPort: 25562
    Like I said, it connects just fine, I just can't log in, and I'm pretty sure I'm not screwing up the simple enough "scorch" and "88". Did I do the config file right, though?
     
  17. Offline

    bekvon

    Your config is fine, but that password is not encrypted properly. Im assuming you changed it after it was already encrypted. What you need to do is set rootEncrypted back to false. Then, the next time it runs, the "88" will be encrypted and rootEncrypted will be automatically set back to true. The "88" will dissapear and a bunch of random letter / numbers will be in its place (which represents the encrypted version of your password). Whenever you change a encrypted password in the config to your new password in plain text, you need to set the encrypted flag back to false so that it knows to re-encrypt it next time.
    Hope that helps :)
     
  18. Offline

    Jesse57

    im not really sure how to connect to my server through this??
     
  19. Offline

    ScorchRaserik

    It does, thank you!

    1) Download the plugin into your server's folder and download the program "PuTTY" (from the OP) on your other computer, assuming you're downloading this plugin to connect to the server from a different computer.
    2) Set up your config file with the username, password, and port you desire (make sure to forward the port you choose). Set rootEncrypted to false before changing the password, as per bekvon's instruction in response to MY question. Start the server.
    3) Run PuTTY. Put in your server's address and the port you set the config file to listen for. Also make sure to check the "Telnet" bubble underneath the IP address. Hit Open.
    4) A console should pop up asking for your username. After typing that in, it will ask for your password.
    5) Profit.

    @bekvon, did I miss anything?
     
  20. Offline

    NathanWolf

    Ummmmm..... whut?

    Epic.... does not even begin to describe this. I did not know anyone had put something like this together yet.

    My next question is- where's SSH? :D

    (I can tunnel for now, don't really care, this is crazy awesome, installing it now, etc...)

    EDIT: Mind.... reeling now... want ssh... custom MessageSender... ssh user permissions .... gahhhhhhh

    @Dinnerbone - POKE! Have you seen this plugin?
     
  21. Offline

    bekvon

    I think you did a great job of summing it up :D
    EDIT: I added a quote of your instructions in the OP, hope thats ok, I think it will help others :)

    Thanks! Glad you like it :D I would love to do a SSH version but I'd have to do some research, as SSH is a lot more involved then simple telnet. Il look into it though :)
     
  22. Offline

    mcfreak

    Crashed my VPS. Cannot connect to SSH 22 port, also asked VPS Support, they said I changed something in config. WTF?
     
  23. Offline

    bekvon

    This shouldnt be able to crash your VPS. The only thing it does is open a new network listen port on whatever port you specify. It rewrites only its own configuration file whenever its needs to encrypt passwords.

    I just implemented this in the new version :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  24. Offline

    AnrDaemon

    LOL I was about to ask the same!
    Just f!n bind it to 127.0.0.0/8 and let anyone wanting to hazk your server try to connect to it first.
    You could always use ssh port forwarding and connect without an issue, of course. You don't even need a separate login (it's just unnecessary complication), ssh login is enough of a proof that you're allowed here.

    Erm...
    Code:
    # telnet 127.0.1.1 8765
    Trying 127.0.1.1...
    Connected to 127.0.1.1.
    Escape character is '^]'.
    ÿû"ÿý"ÿüÿý[MCTelnet] - Session Started!
    Username:
    ÿûÿþPassword:
    What could it be? (console is set to UTF8, of course)
    And how to remove authorization request?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  25. Offline

    bekvon

    Sounds like you've messed with the RegEx part of the configuration file. The RegEx is responsible for stripping off the junk characters that aren't supposed to be displayed. It will be regenerated if you simply remove it from the config file. Also, are you using PuTTY or a different telnet client? If you want to get rid of the auth request, you could maybe set the username / password to blank (I haven't tried that honestly) and then just pressing enter when it asks for user and password. Let me know if that fixes your problems or not.
     
  26. Offline

    AnrDaemon

    I didn't touched config heavily. It was first (or, well, second) lauch of the server, and only setting I've altered was IP it listening on (127.0.1.1).
    I'm using telnet from inside a ssh session. Which is maintained by PuTTY, yes. There were no "RegEx" setting in freshly generated config file.

    EDIT: I would like to get rid of password prompt at all.
    I want to use it as a backend to the command console, so that I could write some nifty managing scripts.
    If you decide to implement this feature, please make it so it only permit auth-less connections from address from 127.0.0.0/8 (or equivalent ipv6) range. (This could be a separate or built-in feature, per your discretion.)
     
  27. Offline

    cyberbobjr

    Hi,
    i have some issue too with the junk character, but it's not really a problem.
    I even have an issue : i can't type "?" command in the telnet terminal, when i type "?" for help, i have :
    Thanks for your help.
    Regards
     
  28. Offline

    bekvon

    Hmm, guess im going to have to take another look at this plugin since you guys are having so much trouble with it. Il try to figure out what's going on. While im at it il see if I can implement the authenticationless option as well.
     
  29. Offline

    fishyfish

    Mashed up some PHP real quick, this is a remote MCTelnet web "client" without any GUI! Maybe I'll slap one on later. Hope someone find it useful.

    This is PHP4 compatible too I believe.

    PHP:
    <?php

    /**
     * @author Christian Berntsen
     * @license public domain
     */

    $host '192.0.0.1'// host ip or address of your minecraft server
    $port '8765'// port
    $user 'derp';
    $pass 'herp';

    $cmd = array("/say Hello World from PHP",
                
    "/kick bekvon""/stop"); // command(s) you want to send
    $cmd implode("\r\n"$cmd);

    $fp fsockopen($host$port$errno$errstr10);
    if(!
    $fp) {
        echo 
    "Error $errno$errstr";
        
    fclose($fp);
    } else {
        
    $out $user."\r\n".$pass."\r\n";
        
    $out .= $cmd."\r\n";
        
    $out .= "exit\r\n";
        
    fputs($fp$out);

        
    stream_set_timeout($fp2); // set the timeout for the fread
        
    while(!feof($fp)) {
            
    $result fread($fp128);
        }
        
    fclose($fp);
    }
    echo 
    $result;
    ?>
     
  30. Offline

    bekvon

    Oooooh! very nice :D I love PHP, but I just don't use it often enough to be good at it. It would be very easy to build a web interface that could run any command using something like this :)

    EDIT: oh, and lol at the /kick bekvon command in there :p
     

Share This Page