Skip to content

Initial Connections #3

Open
Open

Description

@jandolina

My esps have been unable to connect to the various ssh servers I have pointed them at. Is there a way to set up a known hosts file or accept the initial verification fingerprint during connection? Is there more initial setup needed than just ssh_client.connect?

Can I introduce a known_hosts from the ESP32 SPIFFS?
Is there a way to say 'yes' to the the initial handshake?

Thanks!

Activity

  1. Sergio-tix commented on Apr 18, 2020

    @Sergio-tix

    Does not work. Used 3 different servers. Connected to Synology, Raspberry, router.

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download
    ets Jun  8 2016 00:22:57
    
    
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    flash read err, 1000
    ets_main.c 371 
    
    ets Jun  8 2016 00:22:57
    
    
    rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:1
    load:0x3fff0018,len:4
    load:0x3fff001c,len:1216
    ho 0 tail 12 room 4
    load:0x40078000,len:9720
    ho 0 tail 12 room 4
    load:0x40080400,len:6352
    entry 0x400806b8
    SSH client initialized.
    Initializing TCP-IP adapter...
      [OK] TCP-IP adapter initialized.
    Waiting Wifi connection to "www"...
    
    WiFi connected.
    IP address: 192.168.1.16
    Connecting to Server "192.168.1.2:22"...
    SSH host connection established.
    SSH session created.
    Failure establishing SSH session: -125
    Rebooting system now.
    
    ets Jun  8 2016 00:22:57
    
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:1
    load:0x3fff0018,len:4
    load:0x3fff001c,len:1216
    ho 0 tail 12 room 4
    load:0x40078000,len:9720
    ho 0 tail 12 room 4
    load:0x40080400,len:6352
    entry 0x400806b8
    SSH client initialized.
    Initializing TCP-IP adapter...
      [OK] TCP-IP adapter initialized.
    Waiting Wifi connection to "www"...
    
    
  2. dorsetdrew commented on Jul 25, 2020

    @dorsetdrew

    WiFi connected.
    IP address: 192.168.1.16
    Connecting to Server "192.168.1.2:22"...
    SSH host connection established.
    SSH session created.
    Failure establishing SSH session: -125
    Rebooting system now.

    ... Same result here. Tried 3 different SSH servers, always just get the same -125 which appears to be a timeout

  3. trebur commented on Jul 26, 2022

    @trebur

    i have the same problem any ideas ?

  4. borissov commented on Jul 30, 2022

    @borissov

    Need to be updated libssh2 library. You can try my fork for test: http://github.com/borissov/arduino-esp32sshclient/

  5. trebur commented on Jul 31, 2022

    @trebur

    Thank You i will try it

  6. trebur commented on Aug 5, 2022

    @trebur

    Hi borissov,
    I have tested the git lib http://github.com/borissov/arduino-esp32sshclient/ I have followed SendCommandToSSH as far as possible but I get the following error when opening the session

    SSH: LIB2 Client connected before exec
    Connecting to Server "192.168.6.144:22"...
    SSH host connection established.
    SSH session created.
    Failure establishing SSH session: -8
    Rebooting system now.

    any ideas ? What does it it mean -8 ?

  7. borissov commented on Aug 5, 2022

    @borissov

    I have no idea, I'm not sure is it updated lib properly but work with my Mac mini... I plan to rewrite my script with native libssh2 .

  8. YundaoJing commented on Feb 20, 2023

    @YundaoJing

    In J-Rios's Arduino-esp32sshclient,
    Failure establishing SSH session: -8 is meaning that "LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE" in "libssh2.h".
    Check your linux sshd configuration files (/etc/ssh/sshd_config) for any of the following:

    KexAlgorithms diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
    HostKeyAlgorithms ssh-rsa,ssh-dss
    

    After I delet them, it successfully connected to ssh.

    And I find that borissov's Arduino-esp32sshclient can not successfully connected to ssh without these codes in sshd_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions