Console Pixel example from IDE:

#include <Console.h>
const int ledPin = 13; // the pin that the LED is attached to
char incomingByte;      // a variable to read incoming Console data into
void setup() {
  Bridge.begin();   // Initialize Bridge
  Console.begin();  // Initialize Console
  while (!Console);   // Wait for the Console port to connect
  Console.println("type H or L to turn pin 13 on or off");  
  pinMode(ledPin, OUTPUT); // initialize the LED pin as an output:
void loop() {
  // see if there's incoming Console data:
  if (Console.available() > 0) {
    incomingByte =;  // read the oldest byte in the Console buffer:
    if (incomingByte == 'H') {
      digitalWrite(ledPin, HIGH);  // if it's a capital H (ASCII 72), turn on the LED:
    if (incomingByte == 'L') {
      digitalWrite(ledPin, LOW);   // if it's an L (ASCII 76) turn off the LED:

Test above code: 

ssh root@ yourYunsName.local 'telnet localhost 6571'

type "H" will be on, type "L" will be off.

Now we need redirect port 8888 of Arduino Yun ip (i.e. to localhost 6571.

opkg update
opkg install socat
(socat TCP-LISTEN:8888,fork TCP: &

Now you should be able access Yun from PC

telnet 8888

type "H" will be on, type "L" will be off.