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

    wears_Fedora

    Hmm. Mine does log it. Try not using the /, it is superfluous.
    When I
    :list
    I get this in the log:
    [MCTelnet] ###### issued command: list
    Connected players:
     
  3. Offline

    matthew maxwell

    I tried it without the / and it still did not log the command. I normally don't use the / when telnet; not sure why I added it here.

    Snippet from logs:

    2011-04-11 19:59:56 [INFO] th3fallen lost connection: disconnect.quitting
    2011-04-11 20:05:02 [INFO] There are 1 out of a maximum 48 players online.
    2011-04-11 20:05:02 [INFO] Connected players: [AFK]matthew_maxwell
     
  4. Offline

    zerogine

    Go trough a SSH. :)
    Try to port scan you're Router and checks what port are open.

    Note:You Can you any port to use MCTelnet ;)
     
  5. Offline

    Pander_Beers

    Code:
    -bash-4.1$ telnet 24.xxx.xxx.xxx 25565
    Trying 24.xxx.xxx.xxx...
    Connected to 24.xxx.xxx.xxx.
    Escape character is '^]'.
    ovalsneverend
    Connection closed by foreign host.
    
    
    Actually in my config file - I changed the port from 8765 to 2010, but when I try telnet 24.xxx.xxx.xxx 2010 it give me a connection time out.

    I guess my problem is that it's not initiating the MCTelnet when I connect so that I am never asked for my username.
     
  6. Offline

    AgentKid

    Appears to be broken in 699. Connects fine and sends messages to the client about whats happening on the console, but when you attempt to send a command to the console through telnet, you get this error on client and in console:
    Code:
    15:40:24 [SEVERE] java.lang.NoSuchMethodError: net.minecraft.server.MinecraftServer.a(Ljava/lang/String;Lnet/minecraft/server/ICommandListener;)V
    15:40:24 [SEVERE]     at com.bekvon.bukkit.mctelnet.TelnetListener.commandLoop(TelnetListener.java:238)
    15:40:24 [SEVERE]     at com.bekvon.bukkit.mctelnet.TelnetListener.mainLoop(TelnetListener.java:88)
    15:40:24 [SEVERE]     at com.bekvon.bukkit.mctelnet.TelnetListener.access$000(TelnetListener.java:27)
    15:40:24 [SEVERE]     at com.bekvon.bukkit.mctelnet.TelnetListener$1.run(TelnetListener.java:55)
    15:40:24 [SEVERE]     at java.lang.Thread.run(Thread.java:680)
    
     
  7. Offline

    bekvon

    Ive got a fix for this ready, just waiting on a recommended build to release it with :) Also, I improved the command handling a bit. Commands that are run from one telnet session should no longer display on another telnet session, you still get a message indicating that user X used command Y, but you don't see the command output anymore :)
     
    gilgatex likes this.
  8. Offline

    AgentKid

  9. Offline

    cholo71796

    Okay, I've figured out the password thing, but when I open up telnet I just get a blank console. Nothing. What should I put in the listening ip field? My computer's external IP? The server's IP? 0.0.0.0? Maybe the fields could be explained in the original post.
     
  10. Offline

    GameFreakDude

    It works for me; I have listenAddress set to the server's IP.
     
  11. Offline

    cholo71796

    Hmmm, still not getting anything- I'm hosting through Brohoster, that might mean something, but I don't think so. I'm not getting any errors in the server.log file and we're on the latest recommended build.
     
  12. Offline

    bekvon

    Most likely, Brohoster is blocking the port your trying to connect on. Not sure if they would open a port for you either, but its worth a shot maybe.
     
  13. Offline

    GameFreakDude

    I am hosting through Brohoster as well; they told me both what I said above, and that I can put any random number in for the port and it would work.
    If you want, open a livechat or something; they know this plugin inside and out, as they recommend it frequently.
     
  14. Offline

    cholo71796

    Yeah, I'm pretty sure Brohoster doesn't restrict ports. I don't think the problem lies there; I have several other plugins that use fairly random port numbers.

    EDIT: Okay, I added the port to the IP which I assumed wasn't necessary. Now I get the username prompt and type it in, then it asks me for my password and I am unable to type. Strange- possible solutions?

    EDIT: Oh. It doesn't show any of your password characters. I figured it had frozen up since nothing else worked.

    EDIT: Typing "reload" closes the prompt.

    Is the plugin intended to omit chat data? I use HeroChat.
     
  15. Offline

    bekvon

    Oh ok, I didn't know that :D Awesome

    Reload causes MCTelnet to reload too, therefore killing your connection to it, but you should be able to reconnect after a few seconds. I'm not sure about the chat thing to be honest, I'll play around with it and let you know :)
     
  16. Offline

    byzantinian

    I've tried every combination of true/false for rootEncrypted and encryptPasswords and all of them get me to the login prompt and say Invalid Username or Password. Even having a blank username/password gives me Invalid =P. Yes I even read the other posts above me stating to set encryption to false the first time. CB 677.

    <rest removed cuz it connected on other ports>
     
  17. Offline

    Pr4w

    Hey

    I'm getting this error on #703 whenever I try to run a command via the console.
    Code:
    Exception in thread "Thread-344"
    :java.lang.NoSuchMethodError: net.minecraft.server.MinecraftServer.a(Ljava/lang/String;Lnet/minecraft/server/ICommandListener;)V
    :       at com.bekvon.bukkit.mctelnet.TelnetListener.commandLoop(TelnetListener.java:233)
    :       at com.bekvon.bukkit.mctelnet.TelnetListener.mainLoop(TelnetListener.java:84)
    :       at com.bekvon.bukkit.mctelnet.TelnetListener.access$000(TelnetListener.java:32)
    :       at com.bekvon.bukkit.mctelnet.TelnetListener$1.run(TelnetListener.java:60)
    :       at java.lang.Thread.run(Unknown Source)
    
     
  18. Offline

    wears_Fedora


    Nah dude, just pick a port. Here's my config file from my brohoster servers:

    rootUser: wears_Fedora
    telnetPort: 7750
    listenAddress: 50.22.##.##
    rootPass: hockey
    rootEncrypted: false
    encryptPasswords: true


    Make sure you do something like that. The first time you run it, you'll find that "hockey" has been changed to a hash and rootEncrypted: false will be changed to rootEncrypted: true

    When connecting with PuTTY, make sure you select the Telnet radio button and put in your IP AND the port you chose. All should be well after that. Also, I'd pick a random port instead of using the default. It's possible that when you telnet to the default you are connecting to someone else's MCTelnet on the same port and that's why your u/p isn't accepted.
     
  19. Offline

    cholo71796

    @byzantinian
    @wears_Fedora

    Yeah- that's exactly how you do it, except you obviously have to put out the full IP address and port. If you're not /reload'ing your server after you change your config file (though you probably are), that will be a problem.
     
  20. Offline

    byzantinian

    From personal experience at home and at work, if a connection times out on one port and not another, the firewall is blocking it. Whether it's just to my particular BroHoster server or not, I can not get a connection on 22,23,25460, or any other random port# besides 8765 in the default config.

    I'm not really worried about that though, more worried about that no matter what username/password combo I put into my config and the PuTTY prompt (even a blank one), it gives me an invalid username or password error. Obviously my IP/port settings in my config isn't messed up or I wouldn't even be able to establish a connection.
     
  21. Offline

    wears_Fedora

    It is likely that you have a firewall problem.

    Also, yes, your config CAN be messed up and you can still connect on the default port. This is likely because you are connecting to someone else's instance of MCTelnet. Brohoster port forwards, this means that there are likely hundreds of servers using your ip, just on different ports. If there are a bunch of MCTelnet clients running on the same port, you aren't guaranteed which one is answering your request. That is why I suggest you pick a different port. Also, open your firewall for whichever port you use.
     
  22. Offline

    byzantinian

    So then I can't use any random port I should use my 25460 because its forwarded to my server then. Because if i'm going to 50.22.X.X:8765 that's someone elses server entirely.
     
  23. Offline

    wears_Fedora

    No no no. You cannot share ports with your server. Ideally, you want your instance of MCTelnet on its own port.

    Just choose a random low number. I haven't seen minecraft ports below the 20k range, so pick something in the 5-10k range. make sure you shut your server down, change the config, and restart the server. Then use telnet and the port you selected.

    BUT, for right now, the plugin is broken. You'll be able to connect and login, but you get no console output to telnet and sending a command errors out.
     
  24. Offline

    byzantinian

    Seems kind of contrary to the fact that the title says [677] which means according to the plugin release guidelines it's tested working against that build.....which is false.....soooooo someone should defintely downgrade that version to the last working one until there's actually a verified functional 677 build...
     
  25. Offline

    wears_Fedora

    No no on. It DOES work with 677
    It's broke against the 1.5 builds
    Sorry to confuse.
     
  26. Offline

    byzantinian

    Oh lol. Well thanks for all the help! 1.4 here =)
     
  27. Offline

    lolligertyp

    What kind of error is this (the only in the source when I try to compile with 709):
    Description Resource Path Location Type
    The method a(String, int) in the type MinecraftServer is not applicable for the arguments (String, MinecraftServer) TelnetListener.java /MCTelnet/com/bekvon/bukkit/mctelnet line 233 Java Problem
     
  28. Offline

    bekvon

    I just uploaded a minecraft 1.5 compatible build since some people wanted to goahead and get it. :)

    Source is outdated, I will update it in just a min :)
     
    lolligertyp likes this.
  29. Offline

    wears_Fedora

    Config stays the same?
     
  30. Offline

    bekvon

    Yup :)
     
  31. Offline

    byzantinian

    Just wanted to say I couldn't get it to work, and I just got this response from my BroHoster ticker and it resolved my issue.

    All good now thanks so much for this awesome plugin.
     

Share This Page