Arduino using telnet

Hello,
I need to command my board using telnet (terminal). I succeeded at connecting my terminal to my board using telnet. But I want a program (instructions) to make my led turn on when I type the letter "Y" directly from my terminal. How can I make this work?

Thanks!

I know this, and I have tried it, but this only works when you type something in the serial monitor which is not my question!
My question was, what should I write in my TERMINAL (after connecting it to my board using telnet), to send instructions to my board?

I succeeded at connecting my terminal to my board using telnet.

Hard to believe, with no code.

Imadou93:
I know this, and I have tried it, but this only works when you type something in the serial monitor which is not my question!
My question was, what should I write in my TERMINAL (after connecting it to my board using telnet), to send instructions to my board?

If 'TERMINAL' means your telnet client, then what you type in is the character or characters that you want to send the Arduino. That's so obvious that I can't believe you need to be told, and perhaps it's not what you're trying to ask. In that case you need to make your question clearer.

@Peterh,
Was my answer to the OP's question incorrect as he implies ?

My question was, what should I write in my TERMINAL (after connecting it to my board using telnet), to send instructions to my board?

Well, you write some type of command in your terminal, capture and evaluate the command in your telnet server code, then have the server arduno do something based on the command. You need to post your telnet server code to see what you have so far.

raschemmel:
@Peterh,
Was my answer to the OP's question incorrect as he implies ?

I think you answered the question that was asked - but the OP has now asked a completely different question.