OpenWrt Forum Archive

Topic: Adding SSH support

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

I've got a TP-Link Archer v2 - not supported by Open WRT using a Broadcom BCM47081 chip.
I've downloaded the GPL release from tp-link - and I am looking to simply provide SSH.

When I ssh at the moment it's giving me an error - Server refused to allocate pty.
Digging into that - I find that I can likely resolve that by compiling kernel with legacy character support device driver (dropbear seems to be installed).

My two questions are:
- Can I simply using 7zip, remove the existing kernel file and drop in the new firmware (same version, just the additional driver compiled in) - and then load that into the router - will that work, or do I need to do it a different way (I'm thinking memory locations - will that be a problem?)

- Second is, I can't find the Broadcom hndtools that provide the binary arm-brcm-linux-uclibcgnueabi-gcc - but I can see this github project provides it: https://github.com/RMerl/asuswrt-merlin … nueabi/bin
As it's for a different router - I imagine that key aspects of it will be wrong - Am I right in thinking that those utilities as they sit will be wrong to use for this router?

(I'm looking for SSH to get access to IP Tables to add some rules that I can't via the web interface...)

Tried to connect serially, but the root password is now an issue..


Suspect this info might be useful..?
Entry at 0x00008000
Closing network.
Starting program at 0x00008000
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0x18000400 (irq = 117) is a 16550
brd: module loaded
loop: module loaded
pflash: found no supported devices
bcmsflash: squash filesystem found at block 36
Creating 5 MTD partitions on "bcmsflash":
0x000000000000-0x000000040000 : "boot"
0x000000040000-0x000000240000 : "linux"
0x000000240000-0x000000ee0000 : "rootfs"
0x000000fe0000-0x000000ff0000 : "radio"
0x000000ff0000-0x000001000000 : "nvram"
nflash: found no supported devices
PPP generic driver version 2.4.2
NET: Registered protocol family 24
usbmon: debugfs is not available
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:0b.1: EHCI Host Controller
ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:0b.1: irq 111, io mem 0x18021000
ehci_hcd 0000:00:0b.1: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:0b.0: OHCI Host Controller
ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:0b.0: irq 111, io mem 0x18022000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
xhci_hcd 0000:00:0c.0: xHCI Host Controller
xhci_hcd 0000:00:0c.0: new USB bus registered, assigned bus number 3
xhci_hcd 0000:00:0c.0: irq 112, io mem 0x18023000
xhci_hcd 0000:00:0c.0: Failed to enable MSI-X
xhci_hcd 0000:00:0c.0: failed to allocate MSI entry
usb usb3: No SuperSpeed endpoint companion for config 1  interface 0 altsetting 0 ep 129: using minimum values
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
nf_conntrack version 0.5.0 (1960 buckets, 7840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team

Wooohoo!

/etc/shadow = root:$1$GTN.gpri$DlSyKvZKMR9A9Uj9e9wR3/:15502:0:99999:7:::
The username root, password - sohoadmin!

Cheering.. now I just need to configure SSH key I think.

This might be helpful - it's the contents of model.conf decoded (lives in /tmp/dec-model.conf)
# cat dec-model.conf
/* Product id and product version */
PRODUCT_ID = 0x00050002
PRODUCT_VERSION = 0x00000001

COMPANY_NAME = TP-LINK TECHNOLOGIES CO., LTD.
HARDWARE_VERSION = Archer C5 v2
ROUTER_SOFTWARE_VER = 0x5
HTTP_BASIC_REALM_WEB = TP-LINK AC1200 Wireless Dual Band Gigabit Router Archer C5

/* Device Information provided by UPnP */
DEV_MANUFACTURER = TP-LINK
DEV_MODEL_NAME = Archer_C5
DEV_MODOL_VER = 2.0
DEV_NAME = Wireless Router Archer C5

/* Device Information for WEB */
DEV_NAME_FOR_WEB_TITLE = TP-LINK Archer C5

LANGUAGE = EN
DEV_MANUFACTURER_URL = http://www.tp-link.com

/* wireless parameter */
WIRELESS_SSID_PREFIX = TP-LINK
WIRELESS_SHOW_REGION = 1
/* MS */
WIRELESS_DEFAULT_REGION = 0x3A

/* Features */
INCLUDE_DDNS = 1
INCLUDE_DYN_DDNS = 1
INCLUDE_NOIP_DDNS = 1
INCLUDE_CMX_DDNS = 1
INCLUDE_BPA = 0

INCLUDE_IPV6 = 1
INCLUDE_NAS = 1
INCLUDE_USBIP = 1

/* Guest Network */
INCLUDE_GUESTNET = 1

/* system tools */
DEFAULT_TIMEZONE = 480
SYS_UPGRADE_TIME = 80
SYS_REBOOT_TIME = 38

/* we use reset button for QSS too */
MULTI_USE_RESET_BUTTON = 1

HTML_CHARSET = iso-8859-1

WITH_WIFI_SWITCH = 1

/* product type & default system mode */
PRODUCT_TYPE = 1
SYSTEM_MODE = 1

FORBIDDEN_WAN_UPLOAD = 1


SYS_SOFTWARE_REVISION = 0x55aa0311
SYS_SOFTWARE_REVISION_MINOR = 0x01

/* UC version, if need change default uc, please plus 1 */
SYS_USRCFG_VERSION = 0x0003

BUILD_TIME = 4317
BUILD_DATE = 03/17/16

... can't mount / as read write..
# mount -o remount rw /
mount: Mounting rw on / failed: Permission denied

Any thoughts?

The discussion might have continued from here.