Cannot connect to coral dev board after updating to 4.0: mdt shell does not work

2.6k views Asked by At

Recently I updated and flushed the dev board with mendel-enterprise-day-13 according to the coral AI official documentation. After that, when I want to connect from my desktop Ubuntu 19.04 using mdt shell or mdt shell <ip>, it does not work and gives an error message as follows. mdt shell does not work

Connecting to 192.168.101.2 at 192.168.101.2 Key not present on 192.168.101.2 -- pushing

It looks like you're trying to connect to a device that isn't connected to your workstation via USB and doesn't have the SSH key this MDT generated. To connect with mdt shell you will need to first connect to your device ONLY via USB.

Cowardly refusing to attempt to push a key to a public machine. Connecting to 192.168.101.2 at 192.168.101.2 Key not present on 192.168.101.2 -- pushing

It looks like you're trying to connect to a device that isn't connected to your workstation via USB and doesn't have the SSH key this MDT generated. To connect with mdt shell you will need to first connect to your device ONLY via USB.

Cowardly refusing to attempt to push a key to a public machine.

Even though my coral board is connected via both USB C and USB A, it cannot see USB as connected. I ran nmtui from the board terminal to see all active connections and it shows that the board is connected only for USB0 and USB1 and no internet (please see the results below): active connections

I also would like to share one strange thing that I found after running dmesg | grep ttyUSB. It shows several failures and disconnections. usb

[  371.021431] usb 3-1.4: cp210x converter now attached to ttyUSB0
[  371.023282] usb 3-1.4: cp210x converter now attached to ttyUSB1
[ 3326.853419] cp210x ttyUSB0: failed set request 0x12 status: -19
[ 3326.853423] cp210x ttyUSB0: failed set request 0x0 status: -19
[ 3326.853563] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 3326.853728] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1
[ 3332.837337] usb 3-1.4: cp210x converter now attached to ttyUSB0
[ 3332.839815] usb 3-1.4: cp210x converter now attached to ttyUSB1
[ 4001.567889] cp210x ttyUSB0: failed set request 0x12 status: -19
[ 4001.567897] cp210x ttyUSB0: failed set request 0x0 status: -19
[ 4001.568103] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 4001.572366] cp210x ttyUSB1: cp210x converter now disconnected from ttyUSB1
[ 4013.647342] usb 3-1.4: cp210x converter now attached to ttyUSB0
[ 4013.650435] usb 3-1.4: cp210x converter now attached to ttyUSB1

Please suggest me what went wrong.

3

There are 3 answers

0
Sai Nishanth On

I could connect via mendel development tool to coral dev board from freshly installed Ubuntu.

Procedure:

  1. Install mendel development tool on linux host PC
  2. Connect coral dev board via serial port, power on and login to board
  3. Run mdt devices on host PC to see if dev board is already connected (should output 192.168.100.2)4. shell from host PC terminal
  4. Run mdt shell

If coral board needs to be connected to another host PC, only mdt shell will give some errors, I believe it's because it cannot append keys to authorized_keys folder.


  • One option is to login to dev board via serial port (follow this link to enter Screen/Serial Console https://coral.ai/docs/dev-board/serial-console/#connect-over-usb-otg). Inside the screen terminal of the dev board, do cd ~/.ssh/ and remove authorized keys file by rm authorized_keys.
  • Then move to host PC(ubuntu) terminal and run mdt shell again from host PC terminal and this will create keys automatically and then let you into the board.

5
dturvene On

I hit this also upgrading to "day". There are several ways to skin this cat but the trick to use mdt is to put the generated private key at ~/.config/mdt/keys/mdt.key, which must be where mdt is hardcoded to look for it.

So for mdt and ssh access I did this:

1) use ssh-keygen to create private and pub key files.

2) append (or copy) the pubkey file to target /home/mendel/.ssh/authorized_keys

3) copy the private key file to ~/.config/mdt/keys/mdt.key

4) add to local .ssh/config to something like this:

Host tpu
         IdentityFile ~/.config/mdt/keys/mdt.key
         IdentitiesOnly=yes
         User mendel
0
Kaiser Sharif On

I could connect via mendel development tool to coral dev board from freshly installed ubuntu. Also the ip changed from 192.168.101.2 to 192.168.100.2 on running mdt shell.

procedure:

  1. Install mendel development tool on linux host PC
  2. Connect coral dev board via serial port, power on and login to board
  3. run mdt devices on host PC to see if dev board is already connected (should output 192.168.100.2)4. shell from host PC terminal
  4. run mdt shell

If coral board needs to be connected to another host PC, only mdt shell will give some errors, I believe it's because it cannot append keys to authorized_keys folder.

  1. One option is to login to dev board via serial port (inside the screen terminal of the dev board), do cd ~/.ssh/ and remove authorized keys file by rm authorized_keys. Then move to host PC(ubuntu) terminal and run mdt shell from host PC terminal

  2. Or manually generate ssh private-public keys, replace or append(did not test) content of authorized_keys file by the generated public key from host PC (should be in ~/.ssh/id_rsa.pub file in host PC).