Access Luci via ssh port forwarding?

From a Fedora machine, I can ssh to a remote OpenWrt router usiing keyfile, using either ipv4 or ipv6, with DDNS hostnames working as well.

Now, can I use some kind of ssh porting forwarding, such that I can access the remote router's Luci web management interface?

sure, that should work, but you might need openssh instead of dropbear.

1 Like

Does OpenWrt has openssh-server packages?

did you look in the package repository ?

Thank you very much!

I find this https://oldwiki.archive.openwrt.org/inbox/replacingdropbearbyopensshserver

And it is still working for 21.02.0-RC3 .


I still have dropbear listening at port 2222, while openssh-server is listening at 22.

At Fedora side, running this command:
ssh -4v -L 2222:127.0.0.1:2222 user@router
Then
ssh -p 2222 user@127.0.0.1
works.

But when running:
ssh -4v -L 8080:127.0.0.1:80 user@router
Then
curl http://127.0.0.1:8080
got connection refused.

-- Finally this works --
ssh -L 2443:127.0.0.1:443 user@router

Then can connect with
firefox https://127.0.0.1:2443

It can be done with dropbear too.
uci set dropbear.@dropbear[0].GatewayPorts='on'; uci commit dropbear; service dropbear restart

2 Likes

AFAIK 21.02 defaults HTTPS, don't know if anything's listening on port 80 by default.
Haven't installed any 21.02 just yet.

It works.

Thank you very much!

1 Like

Luci is listening on port 80 for http and 443 for https .

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.