0
\$\begingroup\$

I'm in a very embryonal phase of my project, so I'm just putting the pillar on possible solutions.

I'd like to have an opinion or suggestion by experts about this question:

For the above-mentioned project, I should send an SSH-based command to a final device.

Note: the final device can communicate only via ssh.

Although send an SSH command can be simple by using a computer (e.g., by using pink or PuTTy), is there a way to do the same via the Nucleo L476RG board?

Ultimately, can I open an SSH connection by using a Nucleo board and send commands?

Note: The project could admit the purchase of other hardware components if necessary (e.g. wifi modules).

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Yes. You theoretically can.

All you need is for that Nucleo board to have

  1. some sort of network connectivity
  2. an IP stack, a TCP layer that uses that network hardware
  3. an SSH program that uses the above TCP/IP stack to connect to your server.

That's per se possible, but the way you asked indicates you might not be experienced enough to pull off the integration/software porting in reasonable time.

Also, there's other crypto protocols than SSH that are already available for such microcontrollers as yours – there's compact TLS implementations, for example. Building up an SSH connection for well-defined machine-to-machine comms also doesn't sound so effective. So, honestly, hardware is hard and software usually is easier, so change the whatever runs your SSH daemon to accept commands e.g. via a TLS endpoint, and you're removing a lot of the complexity. You'd still need to add networking hardware to your microcontroller, and make your TCP/IP stack talk to that, and you'd still have to learn how to use a TLS library in your microcontroller board, so that's really a lot of effort...


The project could admit the purchase of other hardware components if necessary (e.g. wifi modules).

Generally, this sounds like a job far better suited for a thing that comes with support for "fully fledged" operating systems, like a Raspberry Pi Zero, for example. There, you'll have no problem to just get an SSH client to do what you want.

So, consider that the hardware component you'd want to buy. It can possibly either replace the Nucleo board, or run alongside it, maybe even powered off, until communication becomes necessary.

\$\endgroup\$
2
  • \$\begingroup\$ Do note that TLS is not always viable - in a local network you would need to have your own CA to generate self-signed certs. Quite a lot of overhead. \$\endgroup\$
    – jaskij
    Commented Jan 10, 2020 at 11:18
  • \$\begingroup\$ ?! That's literally two lines of openssl command line... which you'd copy & paste from any article on self-signed certs. \$\endgroup\$ Commented Jan 10, 2020 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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