SFTP error 'Failure establishing ssh session: -5, Unable to exchange encryption keys')!

153 views
Skip to first unread message

Simond

unread,
Sep 18, 2024, 11:30:54 PM9/18/24
to motioneye
I just started getting this error. Anyone have this or know of a solution? I created a new user and have tested the login credentials.  Maybe I need to refresh the keys but how would I even do that since I can't log into the machine?

Thank you!!!
S

StarbaseSSD

unread,
Sep 18, 2024, 11:37:38 PM9/18/24
to motioneye
motionEye, or motionEyeOS? RPi or other SBC or OS? Can't log into the WebGUI? If not, probably a corrupted SDCard.

Simond

unread,
Sep 18, 2024, 11:39:30 PM9/18/24
to motioneye
Motioneye OS.  I can log via the webgui, I can SSH to the machine, no problem. It's just when I test the SFTP connection it gives me the error.   I ssh'd into the motioneye machine and then did a sftp out to my server and that was fine too. 

Simond

unread,
Sep 18, 2024, 11:40:35 PM9/18/24
to motioneye
Full error is this "Accessing the upload service failed: (2, 'Failure establishing ssh session: -5, Unable to exchange encryption keys')!"

StarbaseSSD

unread,
Sep 18, 2024, 11:49:30 PM9/18/24
to motioneye
can you ssh from the motionEyeOS to the sftp server in the terminal? IOW, ssh to the motionEyeOS, then do
ssh [user]@<ftp server>

Simon Dang

unread,
Sep 19, 2024, 12:05:54 AM9/19/24
to StarbaseSSD, motioneye
Yep that's what I tried. No issues. So odd. I can ssh and sftp from the motioneye to my server 

S

From: moti...@googlegroups.com <moti...@googlegroups.com> on behalf of StarbaseSSD <kevin.s...@gmail.com>
Sent: Wednesday, September 18, 2024 8:49:30 PM
To: motioneye <moti...@googlegroups.com>
Subject: Re: SFTP error 'Failure establishing ssh session: -5, Unable to exchange encryption keys')!
 
--
You received this message because you are subscribed to a topic in the Google Groups "motioneye" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/motioneye/vK7tB3vvbso/unsubscribe.
To unsubscribe from this group and all its topics, send an email to motioneye+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motioneye/c358a9e1-55ef-4644-a560-74bd6c9b87f5n%40googlegroups.com.

StarbaseSSD

unread,
Sep 19, 2024, 8:01:36 AM9/19/24
to motioneye
2 things to try:
1) reboot
2) reset settings (change password to something else in motionEye. save it. reboot, and change it back to the correct one, save & reboot) then test again.

Simond

unread,
Sep 26, 2024, 12:18:34 AM9/26/24
to motioneye
Yeah still not working. Tried a different sftp server too.  I may just need to reinstall the OS

Simond

unread,
Sep 26, 2024, 12:21:05 AM9/26/24
to motioneye
Google drive option isn't working either right?

StarbaseSSD

unread,
Sep 26, 2024, 6:58:31 AM9/26/24
to motioneye
Not in 0.42.1, haven't tested with 0.43.1b2

Simond

unread,
Oct 3, 2024, 7:40:00 PM10/3/24
to motioneye
Hi Starbase, I reflashed my ssd card and did a fresh install on my raspberry pi 3 but still getting the same SFTP error. Tried 2 different servers , 2 different user accounts (which I can manually sftp to without any issues).  Any other ideas?   I guess for the meantime I'll use the insecure ftp option.

S

Simond

unread,
Oct 3, 2024, 7:46:06 PM10/3/24
to motioneye
Also tried this Public SFTP server testing account 


but I got the same error when I hit the test connection button on motioneye.  No idea what would cause this error since it's been running great for years until just a few months ago.  

S

StarbaseSSD

unread,
Oct 4, 2024, 11:11:58 AM10/4/24
to motioneye
OK, going back over this thread:

Simond
Sep 19, 2024, 12:05:54 AM
to StarbaseSSD, motioneye
Yep that's what I tried. No issues. So odd. I can ssh and sftp from the motioneye to my server 
S

So what is broken?
Which version of motionEyeOS are you using? 20200606 or dev20201026?

StarbaseSSD

unread,
Oct 4, 2024, 11:40:37 AM10/4/24
to motioneye
Using dev20201026 from clean install on RPiZeroW to debian ssh server using scp:
Using username "admin".
Pre-authentication banner message from server:
| Welcome to meye-c992ec8b!
End of banner message from server

[copy file using scp from debian to motionEyeOS]

[root@meye-c992ec8b ~]# scp pi@custom1:/media/sdc/you*.mp3 /data/etc
The authenticity of host 'custom1 (192.168.2.253)' can't be established.
ECDSA key fingerprint is SHA256:uJ25TnmCZ3V3biwMYMgYtxkWmxJIBz0nS5T70GqPw38.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'custom1,192.168.2.253' (ECDSA) to the list of known hosts.
pi@custom1's password:
yourang.mp3                                                       100%   18KB 430.1KB/s   00:00

[copy file using scp from motionEyeOS to debian
]
[root@meye-c992ec8b ~]# scp /data/etc/yourang.mp3 pi@custom1:/media/sdc/tesdt.mp3
pi@custom1's password:
yourang.mp3                                                       100%   18KB 274.9KB/s   00:00
[root@meye-c992ec8b ~]#

Works both directions.
Set up WebGUI to save to same server
Test button succeeds.
set to enable single snapshots, also works multiple files over several minutes.. Filename used: %Y-%m-%d/%H-%M-%S
Reply all
Reply to author
Forward
0 new messages