dangowrt / owrt-ubi-installer

OpenWrt firmware installer for the Linksys E8450 aka. Belkin RT3200
GNU General Public License v2.0
393 stars 50 forks source link

The instructions to backup the original firmware fail on too-new OpenSSH client #113

Open patrakov opened 2 years ago

patrakov commented 2 years ago

The README contains these commands as instructions to backup the original firmware:

cd /dev
for part in mtd[0123] ; do
dd if=$part of=/tmp/$part
done

Then it tells the reader to use scp to transfer the resulting /tmp/mtdX files to a computer. This last "scp" step may be confusing, because in the latest OpenSSH release, they have internally mapped the "scp" command to use the SFTP protocol by default. Here is the error:

[aep@hp-laptop linksys-e8450]$ scp root@192.168.1.1:/tmp/mtd* .
ash: /usr/libexec/sftp-server: not found
scp: Connection closed

The reader should be instructed to use the "-O" option to fall back to the old and deprecated scp protocol... but I am afraid this would be removed either.

[aep@hp-laptop linksys-e8450]$ scp -O root@192.168.1.1:/tmp/mtd* .
mtd0                                                                                              100%  512KB   3.6MB/s   00:00    
mtd1                                                                                              100% 1280KB   5.7MB/s   00:00    
mtd2                                                                                              100% 1024KB   5.6MB/s   00:00    
mtd3                                                                                              100%  125MB   7.7MB/s   00:16    
huyz commented 1 year ago

I got this error and just assumed the instructions meant for us to run scp from the router itself out to our computer. Just another solution.