access via SSH?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Fri Jun 17, 2016 8:06 pm

thank you friends, now when webrepl works, I'll use it with some SSH port forwarding for my tinkering... :lol:

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: access via SSH?

Post by pfalcon » Fri Jun 17, 2016 8:07 pm

thank you friends, now when webrepl works, I'll use it with some SSH port forwarding for my tinkering...
Please don't forget to post how-to here on the forum.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
patvdleer
Posts: 46
Joined: Mon Jun 13, 2016 11:52 am
Location: Maastricht, NL, Europe
Contact:

Re: access via SSH?

Post by patvdleer » Sun Jun 19, 2016 9:25 am

pfalcon wrote:
jms wrote:
In fact the same could be said of TLS/SSL and using external cloud services. It's much easier to talk to something on the local network without it.

Jon
These are golden words and exactly mirror outlook of the maintainers (well, mine for sure). SSL/TLS is pretty tricky thing, and even big boxes have problems with it, remember or Heartbleed, or at my dayjob, we had intermittent TLS failures for last 2 months and suspected everything up to hardware failure (somewhere at the cloud provider, as customary nowadays). Turned out it's a software issue reported some 5 years ago and marked as "Wontfix": https://bugs.launchpad.net/ubuntu/+sour ... bug/795355 . So again, if "big iron" has problems with it, just imagine what problems small embedded systems have. We provide basic SSL support which works for basic things. I'm ready to go as far as possible beyond that, up to developing own TLS implementation. But before going that deep (can easily take half a year), we're going to make many useful things to be available which should work pretty well in your local network, protected by WPA.
To get around this I setup a proxy and (an attempt at) an MQTT bridge on some old Raspberry Pi's. The idea is that internally my IoT's connect to my raspberry MQTT bridge without ssl, the MQTT bridge sync's to my main server (a simple VPS) via SSL instead of directly without SSL. A simpler solution for secure connections are (of course) welcome!
NodeMCU v0.9 / V1 / V2 / V3
WeMos D1 Mini
WeMos Lolin32 v1.0.0
WeMos Lolin D32 Pro V2

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Sun Jun 19, 2016 10:03 am

any idea how to autostart webrepl easy?

User avatar
patvdleer
Posts: 46
Joined: Mon Jun 13, 2016 11:52 am
Location: Maastricht, NL, Europe
Contact:

Re: access via SSH?

Post by patvdleer » Sun Jun 19, 2016 10:18 am

load it in the main.py (or boot.py)

Code: Select all

import webrepl
webrepl.start()
NodeMCU v0.9 / V1 / V2 / V3
WeMos D1 Mini
WeMos Lolin32 v1.0.0
WeMos Lolin D32 Pro V2

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Sun Jun 19, 2016 3:56 pm

what do you use to edit boot.py?
esptool can overwrite it?

tried to do that way but it doesn't autostart...will invetigate it more....

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: access via SSH?

Post by Roberthh » Sun Jun 19, 2016 4:22 pm

boot.py may also be placed in the source directory under esp8266/scripts. If it exists there, any changes in the local file system of the esp8266 are ignored. You may change/create it in the sources and rebuild the image.
You can also transfer files to esp8266 with the webrepl_cli tool https://github.com/micropython/webrepl

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Sun Jun 19, 2016 7:05 pm

Thnx for the tip... I have just reactivated (removed #) before webrepl lines in inisetup.py and then recompiled micropython, erase_flash and write_flash... webrepl started :)

LarsH
Posts: 1
Joined: Sun Jul 17, 2022 1:55 pm

Re: access via SSH?

Post by LarsH » Sun Jul 17, 2022 2:00 pm

Sorry to revive an old thread, but it is the most relevant one I could find on the internet.
jms wrote:
Fri Jun 17, 2016 11:35 am
The SSH protocol is incredibly heavyweight, an order of magnitude more than what you would want to try running on this board.

It would be better to use a VPN to get onto the network then good old telnet.

In fact the same could be said of TLS/SSL and using external cloud services. It's much easier to talk to something on the local network without it.

Jon
The SSH protocol is actually quite lean. I just implemented a working micropython server in ~850 lines of python. It runs fine on a Raspberry Pico W. I have not tested it on an ESP yet, but it should hopefully work there as well.

It is a work in progress, but the source code is available here: https://github.com/LarsH/larssh

Post Reply