Paswordless public key-based SSH login on router with Asus Merlin firmware
I’m trying to enable passwordless SSH login on my ASUS RT-AC68U home router which runs version 384.4_2 of Asuswrt-Merlin firmware (the most recent one at the time of posting this). Having read many posts and howtos (including this one), I still can’t get it working. I use PUTTYGEN to generate a pair of RSA-2048 keys, save the public key at ~/.ssh/authorized_keys on the router, then try to connect with PUTTY, which I’ve limited to RSA only. As PUTTY negotiates the session encryption, it prompts to accept the public key provided by the server. I expect it to be my key from ~/.ssh/authorized_keys but instead I’m always seeing the dropbear’s own public key (from /etc/dropbear/dropbear_rsa_host_key ). I know it’s that one by running dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key . The permission for ~/.ssh folder is set to 700 , for ~/.ssh/authorized_keys to 600 . The key is saved via the router’s Web UI in the correct format (i.e., ssh-rsa AAAA. 5iYw== rsa-key-20180401 , no line breaks). I tried both root and admin as the SSH user. I also tried everything from scratch, after resetting the router to the factory settings, with the same result. Is there anything I’m missing? At this point, I think my only option would be to extract the dropbear’s private key from /etc/dropbear/dropbear_rsa_host_key and use it instead of generating my own.
Extracting drop ears private key won’t help. Have you considered flashing kong dd-wrt. Adding your public keys via the web interface is trivial with that.
@davidgo, I haven’t tried dd-wrt, but i did try extracting dropbear’s private key and use it with putty and it actually works. Just not happy that the private key lives in the router itself.
[Беспроводное устройство] Как подключиться к роутеру по протоколу Telnet
[Беспроводное устройство] Как подключиться к роутеру по протоколу Telnet Роутеры ASUS позволяют пользователям входить в систему и настраивать маршрутизатор через веб-интерфейс и через приложение «ASUS Router». В дополнение к вышеуказанным методам мы также предоставляем функцию Telnet для опытных пользователей, чтобы подключиться к роутеру и управлять им с помощью команд. Здесь в качестве примера мы используем ZenWiFi XT8 и компьютер на Windows 10, чтобы продемонстрировать, как подключиться к роутеру через Telnet. Содержание: Включение Telnet в роутере ASUS Подключиться к роутеру по протоколу Telnet с компьютера под управлением Windows 10 Включение Telnet в роутере ASUS Шаг 1. Подключите компьютер к локальной сети роутера через проводное соединение и откройте веб-меню, введя в адресной строке браузера: https://router.asus.com
Эта информация была полезной?
- Приведенная выше информация может быть частично или полностью процитирована с внешних веб-сайтов или источников. Пожалуйста, обратитесь к информации на основе источника, который мы отметили. Пожалуйста, свяжитесь напрямую или спросите у источников, если есть какие-либо дополнительные вопросы, и обратите внимание, что ASUS не имеет отношения к данному контенту / услуге и не несет ответственности за него.
- Эта информация может не подходить для всех продуктов из той же категории / серии. Некоторые снимки экрана и операции могут отличаться от версий программного обеспечения.
- ASUS предоставляет вышеуказанную информацию только для справки. Если у вас есть какие-либо вопросы о содержании, пожалуйста, свяжитесь напрямую с поставщиком вышеуказанного продукта. Обратите внимание, что ASUS не несет ответственности за контент или услуги, предоставляемые вышеуказанным поставщиком продукта.
- Ноутбуки
- Сетевое оборудование
- Материнские платы
- Видеокарты
- Смартфоны
- Мониторы
- Показать все продукты
- Item_other —>
- Моноблоки (All-in-One)
- Планшеты
- Коммерческое сетевое оборудование
- Серия ROG
- AIoT и промышленные решения
- Блоки питания
- Проекторы
- VivoWatch
- Настольные ПК
- Компактные ПК
- Внешние накопители и оптические приводы
- Звуковые карты
- Игровое сетевое оборудование
- Одноплатный компьютер
- Корпуса
- Компьютер-брелок
- Наушники и гарнитуры
- Охлаждение
- Chrome-устройства
- Коммерческие
- Commercial_list.Item —>
- Моноблоки (All-in-One)
- Информационные панели
- Ноутбуки
- Настольные ПК
- Мониторы
- Серверы и рабочие станции
- Проекторы
- Компактные ПК
- Сетевое оборудование
- Материнские платы
- Игровые станции
- Data Storage
Ssh на роутере asus
There are two simple methods (which can also be combined) for SSH access depending on your use case.
The first is simple SSH access using the router’s login credentials. This method is most appropriate inside your home network where the risk of outsiders gaining access from the internet is minimal.
The second method is SSH access from outside your home network for which you should use SSH keys and block simple password login. This means any intruder will be automatically denied access since they don’t have the right key.
Quick Summary: Our Top Picks for Asus Routers
I want to see the top picks for Asus Routers
Both of these methods can be combined so you can allow both SSH keys and simple passwords from outside your home network. Ideally if you want to use simple passwords you should VPN into your Asus router instead in which case you would not need to enable WAN SSH access.
I have provided a working example using an SSH key that has already been destroyed.
ASUS Router Simple Local SSH access
Log into the web interface of the Asus Router
Click Administration in the left pane
Click the System Tab
Under SSH Daemon section set Enable SSH to Yes
Set the SSH service port if you don’t want to use the standard SSH port (22)
Set Allow SSH password login to Yes
Set Enable SSH Brute Force Protection to Yes
Scroll down and click Apply
ASUS Router SSH WAN Access Using SSH Keys
This section assumes you already have an SSH key generated, I use PuTTYgen (a guide will be posted eventually but see this one for an overview)
Log into the web interface of the Asus Router
Click Administration in the left pane
Click the System Tab
Under SSH Daemon section set Enable SSH to Yes
Set the SSH service port if you don’t want to use the standard SSH port number 22
If you want SSH access outside your home network set Allow SSH access from WAN to yes
Note that if you are using a private VPN to gain access to your home network, you do not need to Allow SSH access from WAN.
Set Allow SSH password login to No for maximum security
Paste your SSH Public key (not the private key!) in the SSH Authentication key box
Set Enable SSH Brute Force Protection to Yes
Scroll down and click Apply
Now you have enabled SSH access on your ASUS router so you can install additional software, change configurations, enable custom DDNS (guide incoming) and more.