Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mdt shell未连接或推送ssh密钥_Ssh_Google Coral_Mendel Os - Fatal编程技术网

mdt shell未连接或推送ssh密钥

mdt shell未连接或推送ssh密钥,ssh,google-coral,mendel-os,Ssh,Google Coral,Mendel Os,我无法通过OTG USB-C端口通过mdt外壳连接到coral devboard。最初,我有一个孟德尔“公共设备怯懦拒绝”的问题,如一份报告中所述。我使用串行控制台和nmtui在我的局域网上获取devboard,并修复了检查主机上的代码以匹配我的局域网布局(172而不是192块)以及通过mdt shell启动连接的问题 现在,当连接时,我得到以下关于只允许一个ssh密钥的错误。自从我最初刷新主板以来,我只通过串行控制台中的屏幕连接过。从来没有人偷听过 Waiting for a device..

我无法通过OTG USB-C端口通过
mdt外壳
连接到coral devboard。最初,我有一个孟德尔“公共设备怯懦拒绝”的问题,如一份报告中所述。我使用串行控制台和
nmtui
在我的局域网上获取devboard,并修复了检查主机上的代码以匹配我的局域网布局(172而不是192块)以及通过
mdt shell启动连接的问题

现在,当连接时,我得到以下关于只允许一个ssh密钥的错误。自从我最初刷新主板以来,我只通过串行控制台中的
屏幕连接过。从来没有人偷听过

Waiting for a device...
Connecting to undefined-snail at 172.16.1.39
Key not present on undefined-snail -- pushing

Couldn't connect to keymaster on undefined-snail: [Errno 61] Connection refused.

Did you previously connect from a different machine? If so,
mdt-keymaster will not be running as it only accepts a single key.

You will need to either:
   1) Remove the key from /home/mendel/.ssh/authorized_keys on the
      device via the serial console

- or -

   2) Copy the mdt private key from your home directory on this host
      in ~/.config/mdt/keys/mdt.key to the first machine and use
      'mdt pushkey mdt.key' to add that key to the device's
      authorized_keys file.

Failed to push via keymaster -- will attempt password login as a fallback.
Can't login using default credentials: Bad authentication type; allowed types: ['publickey']
第一个建议指向已知的授权密钥。通过串行控制台,我可以看到目录不存在[还没有?]

mendel@undefined-snail:~$ pwd && ls -la
/home/mendel
total 28
drwxr-xr-x 3 mendel mendel 4096 Aug 13 01:11 .
drwxr-xr-x 4 root   root   4096 Feb 14  2019 ..
-rw------- 1 mendel mendel  237 Aug 13 02:01 .bash_history
-rw-r--r-- 1 mendel mendel  220 Feb 14  2019 .bash_logout
-rw-r--r-- 1 mendel mendel 3526 Feb 14  2019 .bashrc
drwx------ 3 mendel mendel 4096 Jul 24 20:51 .gnupg
-rw-r--r-- 1 mendel mendel  807 Feb 14  2019 .profile
关于通过
mdt pushkey
复制本地密钥的第二个建议不起作用,并且重复了我在
mdt shell
之后收到的相同错误消息


macOS Catalina 10.15.6(19G73)。出厂时的新主板上闪现了devboard快速启动说明2020年8月12日

您是否可以尝试使用ssh而不是mdt(mdt只是ssh的包装器)? 我相信这是Catalina的问题,Linux和Mac的旧版本也可以正常工作,我相信这与他们对libusb的更改有关。 此问题已在前面报告过,下面是有关使用ssh的快速指南:

使用以下工具在mac电脑上创建id_rsa密钥:

$ ssh-keygen
这将在MAC上创建一个
~/.ssh/id\u rsa.pub
文件。您可以将该密钥复制到电路板上,并将内容放入
~/.ssh/authorized_keys
(您可以在此文件中放入多个密钥)。 之后,您可以通过修改/etc/ssh/sshd_config禁用密码身份验证,并将PasswordAuthentication从“是”改为“否”,然后在开发板上重新启动ssh服务:

$ sudo systemctl restart ssh
然后,您可以开始使用以下方式将ssh连接到板中:

$ ssh mendel@ip-addr

这成功了!非常感谢。除了一部分——PasswordAuthentication已经设置为no,所以这不是问题。如前所述,我复制了我的公钥并重新启动了sshd。显然,Catalina不支持mdt。哦,没错,抱歉,出于安全原因,PasswordAuthentication默认为yes:)