Skip to content

nopnop2002/esp-idf-ssh-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-idf-ssh-client

ssh client for esp-idf.
You can use the ssh API to execute remote command.
This project use this ssh library.

Software requirements

ESP-IDF Ver4.4
This is because this version supports ESP32-S3 and uses mbed TLS 2.28.1.
ESP-IDF Ver5 has been updated to mbed TLS 3.x.x, but this ssh library does not support mbed TLS 3.x.x.

Installation

git clone https://github.com/nopnop2002/esp-idf-ssh-client
cd esp-idf-ssh-client/
git clone https://github.com/libssh2/libssh2 components/libssh2
cp esp-idf/libssh2_config.h components/libssh2/include
cp esp-idf/CMakeLists.txt components/libssh2
idf.py set-target {esp32/esp32s2/esp32s3/esp32c3}
idf.py menuconfig
idf.py flash

Configuration

config-main config-app

  • SSH Host
    IP address or mDNS name.

ssh command list

ssh command list is defined ssh/command.txt.

$ cat ssh/command.txt
uname -a
ls -l
python --version

Screen Shot

ssh-client-1

Reference

https://github.com/nopnop2002/esp-idf-scp-client

You can use scp and ssh to do heavy processing that esp32 alone cannot.

  • Copy file from esp32 to remote using scp-put.
  • Execute remote command using ssh-client.
  • The processing result is redirected to a file.
  • Copy file from remote to esp32 using scp-get.

For example, image processing:

  • Take a picture using the esp32-cam.
  • Send image files to remote using scp-put.
  • Image processing such as shading is performed on the remote side using scp-client.
  • Receive image file from remote using scp-get.

https://github.com/nopnop2002/esp-idf-telnet-client
This also works with ESP-IDF V5.X.