1

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

The Guy with The Hat's user avatar
The Guy with The Hat
5,3027 gold badges31 silver badges52 bronze badges
askedAug 19, 2014 at 18:28
Joem's user avatar
4
  • 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?CommentedAug 19, 2014 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.CommentedAug 20, 2014 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 / serverCommentedAug 20, 2014 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.CommentedAug 20, 2014 at 5:24

1 Answer1

1

You need to install packageopenssh-client: it's available in thepackage list. Seethis tutorial about how to install optional packages.

You can callssh on the Linux side usingProcess from theBridge 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.

answeredAug 20, 2014 at 8:54
Federico Fissore's user avatar
2
  • 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?CommentedOct 31, 2014 at 11:36
  • You can grab the output produced by the commands run on the serverCommentedNov 3, 2014 at 8:40

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.