whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.18k stars 222 forks source link

buildin ssh wishlist.... #404

Closed mgliewe closed 2 years ago

mgliewe commented 2 years ago

I was pretty amazed to finally be able to connect via ssh to my board.. WTF, thats the f**ng way we want it.

On my wishlist:

ADDENDUM: having scp support opens the gate to use vscode on-device....

the0ne commented 2 years ago

See CONFIG_LUA_RTOS_LUA_USE_SCP_NET It's the scp client only, but the direction wouldn't matter too much, right?

Here's how to use it:

net.scp.get("your_domain.com",22,"/server_path/server_file","/local_path/local_file","user","pass")
net.scp.put("your_domain.com",22,"/local_path/local_file","/server_path/server_file","user","pass")
net.ssh.exec("your_domain.com",22,"/usr/bin/your_command and args","user","pass")
mgliewe commented 2 years ago

It's the scp client only, but the direction wouldn't matter too much, right?

well, it does if you want to mount the esp via sshfs... :)

mgliewe commented 2 years ago
  • proper scp support

after some research i realized that scp isn't really what i was aiming at, my intention was rather being able to sshmount an esp board.

Alas, dropbear doesn't suport the sftp protocol by its own, but relies on an sftp-server binary laying around in the OS to do the work.

So, to accomplish this point on the wishlist, one had to implement the sftp protocol inside the dropbear context.

On the bright sight, the protocol isn't to complicated in though of memory/resource constraints, and there are reference/example implementations one could adopt in lie of GPL.

The cyclone [1] lib came up one my research, which seemed to bee suitable for adoption due to its examplary well designed capsulation of function and OS dependencies...

lg maG

[1] https://www.oryx-embedded.com/products/CycloneSSH.html

mgliewe commented 2 years ago

since I'll leave development on this branch, I just close this one.