Go Down

Topic: Can't telnet to the yun (Read 1 time) previous topic - next topic


Hey guys,

   I just received my new Yun v2 since my original Yun burned. I'm trying to access the yun through SSH but for some reason I can't. I tried SSH to the yun and that part works, but when I tried to telnet localhost 6571 it give me "can't connect to remote host ( Connection refused.

What am I doing wrong?

Thank you for the help


Is it because I'm asking my question the wrong way or is it because no one ever got that kind of error?


Nothing wrong with the way you asked, this just doesn't seem to be a very active forum anymore, at least as far as people stepping up to answer questions. Personally, I try to answer questions when I can, but I have never tried what you are doing (I guess you're trying to access the sketch's Console output without using the Arduino IDE Serial Monitor) and I have no experience with the Yun V2 and don't know all of the differences from the original version. Therefore I have no advice to offer. This is an unusual use case, and I guess there aren't too many who have run into it.


Thank you for the answer it's greatly appreciated. I'm really surprised to see this forum going silent. Why is that ? Is it because the YUN is an old technology and something else replaced it?

And to answer your question I was trying to access the Linux part of the YUN using putty.

To see the Console, select your Yún's name and IP address in the Port menu. The Yún will only show up in the Ports menu if your computer is on the same LAN as the Yún. If your board is on a different network, you won't see it in the Ports menu. Open the Port Monitor. You'll be prompted for the Yún's password.

You can also see the Console by opening a terminal window and typing ssh root@yourYunsName.local 'telnet localhost 6571' then pressing enter.
This is where I get the can't connect to the remote host error. I'm adding that part so that maybe it ring a bell now or someone else.

Thank you again for the help.


I don't know. I'm guessing partly because its older technology, and partly because it's rather expensive for what you get. In my mind, the real power of the Yun is to do as much as possible on the Linux side, and use the sketch as a barely intelligent I/O processor, using the Process class to talk between them. But this means that any advantage of using the simplified Arduino environment is minimized, as much of the work is in Python and Linux. Given that, there are cheaper and more powerful alternatives - for my current project, I threw together a quick prototype using the Yun because I could build the circuit on a proto-shield and prove the concept, but am now designing a PCB that will use a Raspberry Pi Zero W - smaller, faster, and MUCH cheaper.

I feel like a traitor...


Sorry about making you feel like a traitor but thank you for the information. If I would have been an expert and would have been able to fix my own problems I wouldn't have needed an active forum but unfortunately I'm far from that. I'm developping a remote control car, actually version 2, and I really need help on differents issues, one of them is actually telnet on the arduino side from the OpenWRT. I might have to shift to the PI and start from scratch... But thank you for your input I really appreciate your honest answers. Hope to see you on the PI side!


What is it that you are actually trying to do? There may be a better way.

Are you trying to make a Telnet connection from an external computer so you can talk to the sketch? If so, there is an easier way than using the Console class in the sketch and then using the SSH/telnet path through OpenWRT. Instead, use the BridgeServer/BridgeClient classes in your sketch. It's a little more work, but it allows a direct connection to your Yun's sketch from an external Telnet client. I've talked about this in a few older threads, which use the older YunServer/YunClient classes, but it should be pretty easy to convert over the newer style classes:

Or are you trying to communicate to the sketch from something running on the OpenWRT side of the Yun? In that case, you might be better off using the Process class in your sketch. In this case, the Yun will start the process on the Linux side, and then can communicate with it bi-directionaly. If you are talking to a Python script, it's necessary to run Python in unbuffered mode, or else your sketch won't receive anything until it fills up a rather large buffer (I seem to recall it's around 4k bytes?) A couple threads that I recall taking about it:

Go Up