OpenWrt Forum Archive

Topic: disable password when ssh'ing to router from WAN

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How could I setup ssh in the router such that I can access it from the WAN (or from everywhere. Equal opportunity) but only with keys (i.e. no password authentication)?

Enabling SSH keys and disabling password SSH logins using UCI CLI commands:

root@OpenWrt:~# echo "<KEY>" > /etc/dropbear/authorized_keys

root@OpenWrt:~# uci set dropbear.@dropbear[-1].PasswordAuth=off

root@OpenWrt:~# uci commit dropbear
root@OpenWrt:~# /etc/init.d/dropbear restart &
Yanira wrote:

Enabling SSH keys and disabling password SSH logins using UCI CLI commands:

Hey Yanira, this is the WhiteRussian section.  UCI won't work here wink

The discussion might have continued from here.