Is it possible to set the Arduino Yun up as an ssh client? If so, how?

  • The Atheros chip should have enough muscle for an SSH client. The ATmega has not enough resources for that: too little RAM and too slow for reasonable use. But what do you mean by 'SSH client'? An SSH client is a program that can connect to an SSH daemon (or server). So an SSH client can initiate a connection to your PC which runs an SSH daemon. The client can send commands to the PC, the PC executes them. Is that what you mean? – jippie Aug 19 '14 at 18:43
  • Yes that is what I mean. I need the arduino yun to act as an ssh client to start an ssh session with another box and then execute some basic commands. – Joem Aug 20 '14 at 5:04
  • What do you mean that the ATmega doesn't have enough resources for an ssh client. Is this dependent on the work being done by the client or just in the setting up of the client / server – Joem Aug 20 '14 at 5:07
  • You need memory for at least the IP packets and session information as well as for the SSH keys. It would be useful if there was some memory left for regular tasks too. If you manage to squeeze that into maximum of 4kB RAM in the ATmega, then the key exchange would take ages because asymmetric key exchange is very CPU intensive. – jippie Aug 20 '14 at 5:24

You need to install package openssh-client: it's available in the package list. See this tutorial about how to install optional packages.

You can call ssh on the Linux side using Process from the Bridge Arduino library. Best is when you execute single or grouped commands using a syntax as:

ssh user@your_other_host 'echo 1; echo 2'

Managing an open ssh session is possible but I think may be troublesome, so avoid it if you can.

| improve this answer | |
  • Hi. Thanks for that answer. Im still struggling to get a fully operational ssh client. I can connect to the ssh server from the client but how do I receive data back from the server? – Joem Oct 31 '14 at 11:36
  • You can grab the output produced by the commands run on the server – Federico Fissore Nov 3 '14 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.