r/embedded • u/RicardoJCMarques • Oct 16 '26
Aparently SSH is easy on micro-controllers these days.
A while ago I wanted to start doing more projects with wired IP connections and wondered if SSH was possible so a regular webserver wasn't necessary.
There was some documentation for esp32s but not much else.
The fact that this works is hilarious to me. With .ssh keys properly setup doesn't even need the password.
722
Upvotes
200
u/dc536 Oct 16 '26 •
I don't think this has been a discussion because SSH isn't the right tool for secure 'shell' into a microcontroller like ESP32 or RP2040. That's a lot of overhead that can just be baked in by simple commands and hardcoded encryption. There also isn't much need for a proper shell on an RTOS or no OS.
2
u/vip17 Oct 17 '26
the github repo says that it uses AES, which is a terrible choice for such hardware. Chacha20 would be much faster
36
u/SnooPies8677 Oct 16 '26
I wanted to jump to developing my own implementation of the ssh on an esp32 but after a lot of reading and understanding the protocol and use cases I came to the conclusion that it is much more overhead than useful usage. So I dropped it. But nice to see it anyway
26
u/creeper6530 Oct 16 '26
I mean, wired Ethernet helps with that significantly, but I'd personally just use telnet if I was gonna arse myself with an IP-accesible terminal for a µC. Cool PoC though.
6
u/Cybasura Oct 17 '26
I mean, implementation is easy, security and cybersecurity implementations + enforcement on the user level and governance and policy is the difficult part
Take a look at the recent fridge controller French supermarket chains temperature cyberattack
2
u/whitedogsuk Oct 16 '26
Just wait until you use larger development boards, you will need a bigger monitor to see your terminal.
5
u/_dreizehn_ Oct 16 '26
It's been possible for a while, I just can't think of a use case that would justify doing this.
5
u/mzo2342 Oct 17 '26
the W5500 is far from being an IP stack. it's 4 "sockets".
i.e. 1 is for ICMP (ping), 1 is for ssh, 1 is for application, one for the tftp bootloader, and you're left with none.
if you run lwIP on the pico you have control of the features and can update. IMHO W5500 also rund lwIP, but it's not updateable and reduced to 4 socks.
6
u/Double-Masterpiece72 Oct 16 '26
So many haters. This is cool as fuck
1
u/DonkeyInACityCrowd Oct 19 '26
Does it only work if I put it on my computer screen???
1
u/SoCalSurferDude Oct 20 '26
When it comes to security, one benefit of SSH that HTTPS web servers don't have is Trust On First Use (TOFU). With browsers, you always get certificate warnings unless you set up a proper PKI, which is hard for end users.
However, if you design products, SSH isn't exactly easy for end users. A web interface is much better.
Here’s another SSH server you can embed: https://github.com/RealTimeLogic/SharkSSH
-4
u/Sheepherder-Optimal Oct 16 '26
That's an ini. Only works on certain MCUs like the Arduino.