Problem installing OpenWrt on Ubiquiti ER-X router

I am trying to install OpenWrt on my Ubiquiti ER-X router, following these instructions: https://openwrt.org/toh/ubiquiti/edgerouter_x_er-x_ka#migrating_to_2410x

I have completed as far as Step 2a with no problems.

I would like to install 24.10, so I've jumped to the Migrating to 24.10.x section, where step 3 is foxing me.

For the earlier steps, I could copy files to the router using FileZilla and SFTP. But at this stage, that doesn't seem to work any more. FileZilla will not connect to the router. I possiblly need open-ssh-server but the router is not on the internet at this stage.

So my question is:
In "Migrating to 24.10.x", how do I copy the two shell scripts to the router (step 3)?

Many thanks. I know this is probably simple. I just can't work it out!

try winscp, make sure to use SCP as transfer protocol, instead of SFTP.

I've tried scp in windows power shell. It complains about the lack of a sftp server:

"ash: /usr/libexec/sftp-server: not found"

Do I need to explicitly request scp?

yes, that's the same "error", and you do.

OK thanks. Is that possible from Windows Power Shell or do I need to install something else?

it is, but it's just easier to use winscp :wink:

-O or -o (that's not a zero), if I remember correctly.

OK thanks. Will try that now.

That has worked. Many thanks. I wish I'd asked ages ago!
Was my question dumb, or would it make sense to update the instructions page I linked to with slightly more explicit instructions?
Thanks again.

instructions say copy, you could have used wget to grab them directly over internet, I guess, avoiding the problem completely ...

the SCP -> SFTP transition is well known here.

OK, thanks.

Can I ask one more question?

Now I've transferred those two script files to the router, I've run the migrate one. It's complaining about unexpected new lines. I seem to remember something about Windows messing up new lines and carriage returns in Linux files?? I have to download on Windows because I don't have a Linux computer. And the router isn't on the internet yet, so I can't use wget.

go to the github page, and click on the scripts, click on the "Download raw file" next to the Raw button, transfer them unedited afterwards.

1 Like

After you download the file to Windows do not open it with an editor, just transfer it to the router with scp as it is.

On the router you can examine the file with cat or vi or nano and confirm it is lines of script as expected, without any html etc that would occur if it was not downloaded raw.

It does make sense to add it, as this SSH compatibility error only popped up with more recent Linux distributions. And it can indeed be worked around by -O (uppercase or lowercase, I don't remember).

@frollic Might be well known, but we should not assume everyone knows. The wiki caters to everyone.

1 Like

indeed, but it'd be better to have a generic "scp transfer issues" page about this, instead of C&Ping the same info about the -O switch into all instructions using SCP to transfer stuff to the device ...

1 Like

It's capital O, it means "use Old transfer method instead of the new way of sftp". Small o is for low-level ssh options like forcing the use of deprecated crypto algorithms.

2 Likes

Thanks everyone for the help. I now have OpenWrt 24.10 running on my router!

(For anyone reading this in future, you need to do

chmod +x ubnt_erx_migrate.sh

before you run the migrate.sh script. This is mentioned in the instructions on the github page, but not in the instructions I linked above.)

1 Like

Could it at least be stated that you must use scp and cannot use sftp (which, confusing me, had worked earlier in the process?)

go back to wiki, read and approve the additional info :wink:

Thanks for updating it. You've said "if" you use scp. Is there any other way?

wget, if available, C&P over ssh.