Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Connections #3

Open
jandolina opened this issue Sep 18, 2019 · 8 comments
Open

Initial Connections #3

jandolina opened this issue Sep 18, 2019 · 8 comments

Comments

@jandolina
Copy link

jandolina commented Sep 18, 2019

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!

@Sergio-tix
Copy link

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"...

@dorsetdrew
Copy link

dorsetdrew commented Jul 25, 2020

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

@trebur
Copy link

trebur commented Jul 26, 2022

i have the same problem any ideas ?

@borissov
Copy link

borissov commented Jul 30, 2022

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

@trebur
Copy link

trebur commented Jul 31, 2022

Thank You i will try it

@trebur
Copy link

trebur commented Aug 5, 2022

Hi borissov,
I have tested the git lib https://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 ?

@borissov
Copy link

borissov commented Aug 5, 2022

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 .

@YundaoJing
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants