I’m basically following the scp example shown in the section “return to stock firmware”, here.
I can confirm that I can successfully ssh into the router.
$ ssh root@192.168.1.1
BusyBox v1.36.1 (2023-10-09 21:45:35 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 23.05.0, r23497-6637af95aa
-----------------------------------------------------
root@OpenWrt:~#
Adding to Nachlese, the option -scp also does not seem to be in the current man page. I’m no expert, but if it is being interpreted as -cp, this would mean to choose cipher p, which is consistent with the error message. According to OpenWrt’s page, -scp is supposed to force the use of the SCP protocol. It looks like the current way to do so is with the -O (uppercase letter O) option.
Thanks everyone for the replies and the help. Great community here.
I managed to get it working by replacing the two options -2 and -scp with a single -O option.
Probably would have worked equally well without the -i, -r and -P options, but I left them in anway.
First what doesn’t work, with the following error message:
ssh root@192.168.4.1
Unable to negotiate with 192.168.4.1 port 22: no matching host key type found. Their offer: ssh-rsa
It works with this additional option to the command:
ssh -o HostKeyAlgorithms=+ssh-rsa root@192.168.4.1
The authenticity of host '192.168.4.1 (192.168.4.1)' can't be established.
RSA key fingerprint is SHA256:CpF6Io9GR0jnSWnnJu4hH4/d16dhTVbogIp0/5gSgeI.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.4.1' (RSA) to the list of known hosts.
root@192.168.4.1's password:
BusyBox v1.30.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 19.07.4, r11208-ce6496d796
-----------------------------------------------------
root@OpenWrt:~#
-o HostKeyAlgorithms=+ssh-rsa
is the only thing I need to add to the command
because this routers sshd does not support whatever the default key algorithms on modern Linux like Manjaro or Mint are
To scp copy a file to the routers /tmp directory: scp -o HostKeyAlgorithms=+ssh-rsa /path/to/file root@192.168.4.1:/tmp
Mine is obviously a much older version of OpenWRT - the hardware is not the most recent.
It is an: AVM FRITZ!Box 7412 which I use to run Travelmate - I never bothered to keep it up to date since I installed and configured it.
Yes, I knew that - but I didn’t bother doing it - I very rarely need to ssh into the thing.
But now that you served me with the copy/paste ready solution, I was not going to let your effort go to waste.
It works - of course!
Thank you!