This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: SSH over USB

Part Number: AM3358

Tool/software: Linux

Hi all,

I have a custom board designed from the BBB. I have recently change from the BBB kernel 4.4.45 to the ti supported kernel 4.4.62 running debian. I had the usb in working order before I switched to the ti kernel, but now I am having troubles connecting SSH over USB. When I connect the usb cable I now get usb0 usb1 and a tether instead of only usb0.

root@arm:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:480 errors:0 dropped:0 overruns:0 frame:0
TX packets:480 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:37600 (36.7 KiB) TX bytes:37600 (36.7 KiB)

tether Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::8411:b1ff:fe8c:7227/64 Scope:Link
UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:254 (254.0 B)

usb0 Link encap:Ethernet HWaddr b0:d5:cc:e6:83:87
UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb1 Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I fail to SSH into 192.168.7.2

Is there something simple that I am missing?

  • Hi Heath,

    I am not seeing any interface with 192.168.7.2. Also usb0 is not having any IP configured.
    Can you ifconfig usb0 192.168.7.2 and then ifconfig usb0 up and check ?
  • Did not seem to work:

    [ 49.088611] configfs-gadget gadget: high-speed config #2: c
    [ 49.095179] IPv6: ADDRCONF(NETDEV_CHANGE): usb1: link becomes ready
    [ 49.101666] tether: port 1(usb1) entered blocking state
    [ 49.106990] tether: port 1(usb1) entered forwarding state
    ifconfig usb0 192.168.7.2
    root@arm:~# ifconfig usb0 up
    root@arm:~# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:2400 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2400 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:185440 (181.0 KiB) TX bytes:185440 (181.0 KiB)

    tether Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
    inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::38fb:faff:fe46:2c26/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:94 errors:0 dropped:0 overruns:0 frame:0
    TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:12945 (12.6 KiB) TX bytes:2985 (2.9 KiB)

    usb0 Link encap:Ethernet HWaddr b0:d5:cc:e6:83:87
    inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
    UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    usb1 Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
    inet6 addr: fe80::1eba:8cff:fea2:ed73/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:94 errors:0 dropped:0 overruns:0 frame:0
    TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:12945 (12.6 KiB) TX bytes:5620 (5.4 KiB)

    ssh: connect to host 192.168.7.2 port 22: Connection refused

  • Hi Heath,

    1. Does pinging to 192.168.7.2 work ?
    2. Have you made sure sshd is running in the TI Board ?
  • I got it to work, although I am somewhat confused, after looking in the setting on the ubuntu host machine I noticed that the ip of the new wired connection was 192.168.0.2 I then tried ssh into 192.168.0.1 instead of 192.168.7.2 and that did the trick. So it seems that my USB is being configured as usb1 instead of usb0. Here is my settings in /etc/network/interfaces:
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp

    iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252
    network 192.168.7.0
    gateway 192.168.7.1

    and if I do a ifconfig:

    root@arm:~# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:5288 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5288 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:407840 (398.2 KiB) TX bytes:407840 (398.2 KiB)

    tether Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
    inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::20c3:baff:fe51:7e42/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:153 errors:0 dropped:0 overruns:0 frame:0
    TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:21756 (21.2 KiB) TX bytes:6580 (6.4 KiB)

    usb0 Link encap:Ethernet HWaddr b0:d5:cc:e6:83:87
    inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
    UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    usb1 Link encap:Ethernet HWaddr 1c:ba:8c:a2:ed:73
    inet6 addr: fe80::1eba:8cff:fea2:ed73/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
    RX packets:153 errors:0 dropped:0 overruns:0 frame:0
    TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:21756 (21.2 KiB) TX bytes:9422 (9.2 KiB)