# Unable to ssh on eth0 (RJ45)

**URL:** <https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891>\
**Category:** mangOH Green\
**Created:** [February 27, 2020, 8:29pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891 "2020-02-27T20:29:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ragh](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@ragh](https://mangoh.discourse.group/u/ragh)\
**Post date:** [February 27, 2020, 8:29pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/1 "2020-02-27T20:29:51Z")

</div>

I’m using MangOH green board with WP7603 for the testing, I want to connect USB drive using OTG cable to micro USB so I enabled SSH and PING on eth0(RJ45) in the iptable, after enabling I could ssh into the device using eth0(RJ45) port but as soon as I disconnect the micro-USB cable from the device it is loging out of SSH on eth0(RJ45). I want to ssh on eth0(RJ45) without microUSB connected.

I’m using SWI firmware version SWI9X07Y\_02.28.03.01

root@swi-mdm9x28-wp:~# cm info  
Device: WP7603  
IMEI: 357409080004288  
IMEISV: 6  
FSN: U3734285610406  
Firmware Version: SWI9X07Y\_02.28.03.01 000000 jenkins 2019/04/17 03:08:11  
Bootloader Version: SWI9X07Y\_02.28.03.01 000000 jenkins 2019/04/17 03:08:11  
MCU Version: 002.011  
PRI Part Number (PN): 9906965  
PRI Revision: 002.000  
Carrier PRI Name: GENERIC  
Carrier PRI Revision: 002.064\_000  
SKU: 1103194

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [February 28, 2020, 2:21am UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/2 "2020-02-28T02:21:58Z")

</div>

I guess the module has gone to sleep mode after you unplugged the USB cable.  
Please run the app to make the module still awake after USB disconnect.  
[wakeup\_app.rar](https://mangoh.discourse.group/uploads/short-url/4uATXQ5rKtkvAGGXwwRNVeDQlYN.rar) (199.2 KB)

---

<div class="post-metadata">

**Author:** ![ragh](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@ragh](https://mangoh.discourse.group/u/ragh)\
**Post date:** [February 28, 2020, 6:26pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/3 "2020-02-28T18:26:16Z")

</div>

Thanks for sharing the app, I could run the wakeup\_app app and now the board is not going to low power mode and I’m able to ssh on eth0.

Now the problem is I’m not able to assign a static IP on port eth0 during bootup.  
I modified /etc/network/interfaces to have this value at bootup, do you happen to know if I’m missing anything?

```
auto eth0
iface eth0 inet static
    address 192.168.1.125
    gateway 192.168.1.255
```

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [February 28, 2020, 7:47pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/4 "2020-02-28T19:47:39Z")

</div>

After you boot, does the device have an IP address assigned by DHCP or is there no IP address assigned? Also, what happens if you do `ifdown eth0` and then do `ifup eth0`? Does it then have the static IP assigned?

---

<div class="post-metadata">

**Author:** ![ragh](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@ragh](https://mangoh.discourse.group/u/ragh)\
**Post date:** [February 28, 2020, 8:08pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/5 "2020-02-28T20:08:09Z")

</div>

There is no IP assigned at the boot up by dhcp,

Here is the ifconfig output,

```
eth0 Link encap:Ethernet HWaddr D2:B8:DD:74:34:B4
          inet6 addr: fe80::d0b8:ddff:fe74:34b4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12904 (12.6 KiB) TX bytes:712 (712.0 B)

```

if I do ifdown it say eth0 is not configured,

```
root@swi-mdm9x28-wp:~# ifdown eth0
ifdown: interface eth0 not configured
```

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [February 28, 2020, 9:28pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/6 "2020-02-28T21:28:07Z")

</div>

what happens if you now do `ifup eth0`? Do you get an IPv4 address?

---

<div class="post-metadata">

**Author:** ![ragh](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@ragh](https://mangoh.discourse.group/u/ragh)\
**Post date:** [February 28, 2020, 9:53pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/7 "2020-02-28T21:53:01Z")

</div>

Sorry forgot to paste ifup command result, here is the result,

```
 root@swi-mdm9x28-wp:~# ifdown eth0
    ifdown: interface eth0 not configured
    root@swi-mdm9x28-wp:~# ifup eth0
    ifup: don't have all variables for eth0/inet
    root@swi-mdm9x28-wp:~#
```

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [February 28, 2020, 11:54pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/8 "2020-02-28T23:54:02Z")

</div>

You can assign ip manually  
Ifconfig eth0 xxx. Xxx. Xxx. Xxx

---

<div class="post-metadata">

**Author:** ![ragh](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@ragh](https://mangoh.discourse.group/u/ragh)\
**Post date:** [March 2, 2020, 3:01pm UTC](https://mangoh.discourse.group/t/unable-to-ssh-on-eth0-rj45/3891/9 "2020-03-02T15:01:06Z")

</div>

```
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255

```

With the above statements in the file /etc/network/interfaces device could setup ip address statistically at boot up, thanks all for the help.
