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

    AnrDaemon

    It's not a problem to do so with "Real Language", like PHP.
    But as server don't process signals currently, stopping it gracefully is a separate pain. That's mainly what I plan to do - stitch netcat with init script (or upstart job, if you have that).
     
  3. Offline

    fishyfish

    Thank you sir! Appreciate this mod alot, thought I'd do my fair share here, keep up the good work. :)

    Haha :p
     
  4. Offline

    Sparx

    I don't think MC really needs an SSH plugin (well maybe for Mac/PC users). I use Linux, so I just have the program "screen" installed. It's one of the most useful things ever. Log into your server with SSH, type "screen" and press space a few times to get past the messages. From there you are in a virtual terminal/console and can start your server from there. After that you can create new terminals within that same terminal and flip through them (sounds complicated but it's not). After that you can simply close Putty but the MC server remains online. After that, you can log into your server again via SSH and type "screen -x" to reattach to the MC server process in multi-user mode. From there (if any other people have logged on and also typed "screen -x") anything you type is visible to other people on the terminal, updating in real time.

    Best program evar.
    My apologies if the description is a bit hard to understand, it's 2:30am here :|
     
  5. Offline

    AnrDaemon

    _MC_ don't need the support for SSH in itself, there's TONS of ways to get an encryptes channel to your host under literally any operating system.
    Even for windows, I can think about at least two of them, both OSS/FS.
    For Mac, I don't know much, but since it's Linux in itself, you could as last resort compile sshd yourself, I think.
    For Linux - sshd is a part of most standard distributions.

    And, of course, OpenVPN, which (in contrast to PPTPD) is fairly reliable and widely available.

    How do you shutdown/reboot your server running Minecraft, then? (It's not sarcasm, if you'd think, I'm honestly asking for your experience and advice.)

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

    Sparx

    What do you mean? I can just type "stop" to stop the MC server and then "reboot". Wait a minute or 2 and the connect via SSH again, start up screen and MC server again.

    @bekvon Also, when connecting on Microsoft's Telnet, I can't use backspace :(
    I can on putty though.
     
  7. Offline

    AnrDaemon

    Not acceptable. It should be completely unattended process. Minecraft server starting up from init script, and should get down gracefully by the same script at appropriate runlevel(s).

    Use PuTTY, M$ telnet is a joke of application.
     
  8. Offline

    bekvon

    Yea, theres no real need for built in SSH, since even on windows there is a free ssh server program you can get. I think its called FreeSSHD, and after that you can simply putty telnet into you mcserver. I still am going to try to implement a authenticationless option for when you telnet in from localhost, but just havn't gotten around to doing it since been busy with other plugins.

    Your init script can probbably incorporate the "screen" utility itself to make it both unattended and still allow you to close the console window without killing your server.

    And yea, I wouldn't trust any MS software to follow industry standards.... so one can assume that it why it doesn't work.
     
  9. Offline

    AnrDaemon

    I'm not using Screen. I'm going to post scripts soon, once i'm confident they are not giving *me* headache.

    And you still not understand me :) I don't want to close console. I want OS to do that in init script.
    Since CB server does not process system signals currently, I have to use some kind of crutches, like passing "stop" command through telnet. I'm not very pleased by this solution, but it works... somewhat. In conjunction with start-stop-daemon ability to "ping" process without sending meaningful signals, it's something I could live with for a short while...
     
  10. Offline

    Sparx

    Yea M$ telnet is quite shitty. But at least I have easy access to console on any comp now :)

    And I could make the MC server start be unattended, but I'd rather it not be. Although I did make a script so that it would start up when server started, and if MC server quits or crashes, it would backup the map
     
  11. Offline

    Su0malainen

    I have this problem: Everything works okay until I make connection with PuTTY. It asks for username and I write console as said in config then when I try to write the password I cant! No other button in my keyboard works other than Enter. I've tried this with three computers and got same problem with them all.

    config.yml
    Code:
    rootUser: console
    
    telnetPort: 8765
    
    listenAddress: 0.0.0.0
    
    rootPass: eaedd111d63375c73c14f5dc449e7344
    
    rootEncrypted: true
    
    encryptPasswords: true
    
     
  12. Offline

    AnrDaemon

    Well, disregard my previous comment.
    Have you tried using standard telnet program that is supplied with Windows?
     
  13. Offline

    Alex K

    If you try and Ban IP through the telnet client, which is putty for me, it doesn't accept Periods. IF I typed banip 12.34.567.81, it would still put it in the banned ip addresses list, but under 123456781, and they can continue to join. Is this just a putty thing, if so, what client will accept periods being sent though? Thanks.
     
  14. Offline

    BigBlueGER

    Umm, this works fine, but sometimes it sends some strange characters.
    I've made a small pic. You should know what I mean then:
    [​IMG]
     
  15. Offline

    Dev

    Edit: Nvm, got it working.
     
  16. Offline

    bekvon

    Your not supposed to see the characters as you type them. So even if you don't see the characters, they are being typed.

    Hmm, I think I can fix this... Il do it when I can.

    Yea, it seems to happen with some peoples telnet clients... I don't know why either, as long as it still works I wouldn't be to concerned about it though.
     
  17. Offline

    bloodmark3

    Uhm. When I download the file I dont have a configs.yml.
    I have plugin.yml. Wich has nothing in it except some names.
    Manifest.mf. And a few .classes.
     
  18. Offline

    AnrDaemon

    Ever tried installing and running plugin first?
     
  19. Offline

    bloodmark3

    I put it in my plugins folder. And started the game. What else can i do?
     
  20. Offline

    AnrDaemon

    Now you can look in yor $ServerDir/plugins/MCTelnet/ for config.yml
     
  21. Offline

    Lacho

    Hello, how can you add another user with different permissions? :)
     
  22. Offline

    AnrDaemon

    You're asking in wrong thread. This plugin has nothing to do with permissions.
     
  23. Offline

    Lacho

    Sorry, I read this in the description, I thought it supported more than one user.

     
  24. Offline

    GameFreakDude

    Looking through this thread it looks like I'm not the only person with this problem: only alphanumeric characters (and dashes - , for whatever reason) reach the console, and the rest disappear, making it impossible to ip ban, among other things. Thankfully I don't need to ip ban at all, but I do chat through this plugin often and the inability to use punctuation can sometimes cause great miscommunication. Hopefully this can be fixed. Otherwise, this is a very swell plugin!
    A suggestion: I don't know a lot about this sort of stuff, but I noticed PuTTY has this "bell" feature in the settings; a quick Google search brought me here with some technical details. I think it would be useful to have an audible notification when someone connects or chats or something. Perhaps this could be configurable? Ex. bells are only sent when OPs or certain users chat, or only when people connect/disconnect, or only with severe or error messages, maybe only when people chat certain phrases or their chats are preceded by a certain string? I would be just peachy if this were implemented, if it's possible :D
     
    matthew maxwell likes this.
  25. Offline

    zerogine

    I Love you!
    Thanks![diamond]

    For you guys who cannot understand PuTTy here's a little tutorial:

    1. Connect using PuTTy
    a) Hostname is where your going to connect let's say 127.0.0.1 your local IP.
    b) Check the Telnet option box.
    c) Type in the port in the textbox.
    d) When everything is set click the "Open" button in the right corner.


    [​IMG]

    2. Making Telnet handy
    You can use any command you want via the telnet like help, give, tp etc...

    3. Why Telnet?
    Because don't you want to access your server from anywhere? School? Work? At your friend's house?
     
  26. Offline

    PyroProgramer

    Epic! I was getting tired of having to use the screen command so I could open up and do things in the server, This is wonderful!!!
     
  27. Offline

    bekvon

    I just fixed the dashes and periods, sorry it took so long to get to this, been busy with other mods. I'll look into the PuTTY bell thing, as that is a neat idea :)
     
  28. Offline

    matthew maxwell

    This is the exact issue I am having. Any special character doesn't come through. It's frustrating because there are some users with an underscore in their name that I can't do anything to through the console.

    Other than that, though, this plug in is fantastic.

    Very nice work, man.

    My work blocks outbound requests on any ports except very basic protocol ports. :(

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

    bekvon

    Try putting somthing like this in your config file:

    commandRegex: [^a-zA-Z0-9 \\-\\.\\_]

    This is the allowed character filter, to add a character just put a \\ before it, at the end right before the last bracket. See it that works :) You actually may be able to leave the \\ off in some cases, but im not too familiar with how these regex things work.
     
  30. Offline

    matthew maxwell

    That worked.

    The regex I used is: commandRegex: /[[a-zA-Z0-9]{1,}[\s\\-\\.\\_\\?\\!\\,\\']{0,}]{1,}/

    What might be useful to add is when a user is logged into MCTelnet, if when they say a command, it would echo that in the server.log (I notice it doesn't on mine), and also if you would add the IP doing the request like

    [MCTelnet 168.254.123.1] kick douchebag

    Just to clarify on the command thing, I'll show you an example.

    I log into the console, and I type /list, and the console outputs users.

    In server.log I see:

    "[MCTelnet] user connected...."
    "There are 1 out of a maximum 48 players online..."
    "<usernames>"

    It'd be nice if MCTelnet logged the command being used (if possible). And the IP thing would be great, too, so I can give one of my friends telnet access and make sure that if anything funky happens, there's a log of it.

    It's not that I don't trust him, but I have always been an advocate of accountability.

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

Share This Page