7 Replies - 1332 Views - Last Post: 31 May 2013 - 02:09 PM Rate Topic: -----

#1 the5thelement   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 61
  • Joined: 30-July 12

Telnet Remote Access

Posted 31 May 2013 - 12:02 PM

I'm sorry if this is a stupid question, but how would I go about making a telnet
remote access connection to a server and then execute a command. I have googled
for about an hour, but all I can't seem to find what I am looking for.

I am asking this because I am working on a mini game
for a game I am making were the player can win prizes.
I need remote access so I can give the player rewards inside the game through a command on the server.

This post has been edited by the5thelement: 31 May 2013 - 12:04 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Telnet Remote Access

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14164
  • View blog
  • Posts: 56,756
  • Joined: 12-June 08

Re: Telnet Remote Access

Posted 31 May 2013 - 12:21 PM

Is this server web accessible? If so why not just use a web service? Telnet seems like such a long run around to increasing some value in a database.
Was This Post Helpful? 1
  • +
  • -

#3 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4240
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Telnet Remote Access

Posted 31 May 2013 - 12:26 PM

This seems like an overly complicated way of doing that. I'd suggest just setting up a simple web server - something based on Note.js perhaps (it's extremely simple to do) - that executes this command, and then your game can simply send a standard HTTP request instead.

It would be a lot safer as well. Giving clients remote telnet access to the server is just asking to be hacked. Even with a highly restrictive user, it's still a much much greater risk than something like the above suggestion.
Was This Post Helpful? 1
  • +
  • -

#4 the5thelement   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 61
  • Joined: 30-July 12

Re: Telnet Remote Access

Posted 31 May 2013 - 12:41 PM

View Postmodi123_1, on 31 May 2013 - 12:21 PM, said:

Is this server web accessible? If so why not just use a web service? Telnet seems like such a long run around to increasing some value in a database.


Items in my game have a unique id for each instance of the item. So if I did it this way
I would have to take an item from one player and give it to the new player.


View PostAtli, on 31 May 2013 - 12:26 PM, said:

This seems like an overly complicated way of doing that. I'd suggest just setting up a simple web server - something based on Note.js perhaps (it's extremely simple to do) - that executes this command, and then your game can simply send a standard HTTP request instead.

It would be a lot safer as well. Giving clients remote telnet access to the server is just asking to be hacked. Even with a highly restrictive user, it's still a much much greater risk than something like the above suggestion.


How would I go about doing this?
Was This Post Helpful? 0
  • +
  • -

#5 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4240
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Telnet Remote Access

Posted 31 May 2013 - 01:07 PM

View Postthe5thelement, on 31 May 2013 - 08:41 PM, said:

How would I go about doing this?

Using Note.js? They have an example of the code required to run a simple web server on their homepage. Then you should be able to use the child_process.exec function to execute whatever command you need for this.

Another option, if Note.js is not your thing, would be to use the common Apache+PHP setup. Those exist pretty much everywhere, and can be installed on most Linux distros with a single command, or through easy installers on Windows.
Was This Post Helpful? 0
  • +
  • -

#6 the5thelement   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 61
  • Joined: 30-July 12

Re: Telnet Remote Access

Posted 31 May 2013 - 01:15 PM

I am running Xampp Apache so the PHP would probably be better.
Was This Post Helpful? 0
  • +
  • -

#7 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4240
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Telnet Remote Access

Posted 31 May 2013 - 01:43 PM

OK, then you'd want to look into the PHP exec() function. You can use that to execute your command.

Either that or replicate whatever that command does in PHP code. If it's just something like messing with some database values, PHP is a perfect language for that.
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14164
  • View blog
  • Posts: 56,756
  • Joined: 12-June 08

Re: Telnet Remote Access

Posted 31 May 2013 - 02:09 PM

Then there's this: Setting up a PHP web service to be consumed by VB.NET
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1