Cannot add device: device key expected before created
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtcreator-plugin-ubuntu |
Fix Released
|
Critical
|
Juhapekka Piiroinen | ||
qtcreator-plugin-ubuntu (Ubuntu) |
Fix Released
|
Critical
|
Zoltan Balogh |
Bug Description
In the Ubuntu SDK, I cannot add a device (unless I had successfully added one previously somehow).
Reason: the openssh_version script expects the ssh key for the device to exist before it actually does.
That script is delivered by qtcreator-
When you add a device with: Devices, then Detect in the SDK, this script is called:
/usr/share/
BEFORE this script script is called:
/usr/share/
The second script creates the key if it does not exist.
But openssh_version assumes the device key is in place with this code:
ssh-add ~/.ssh/
If there is no such key, the Devices Detect sequence hangs on openssh_version stage (with no helpful data in the Log panel).
A simple workaround (although perhaps not the right one given other factors), is to test for the key and generate it in openssh_version like this:
if [ ! -f ~/.ssh/
ssh-keygen -t rsa -N '' -f $SSHIDENTITY -b 768
fi
ssh-add ~/.ssh/
description: | updated |
Changed in qtcreator-plugin-ubuntu: | |
assignee: | nobody → Juhapekka Piiroinen (juhapekka-piiroinen) |
Changed in qtcreator-plugin-ubuntu: | |
importance: | Undecided → Critical |
Changed in qtcreator-plugin-ubuntu: | |
status: | Confirmed → Fix Committed |
Changed in qtcreator-plugin-ubuntu: | |
status: | Fix Committed → Fix Released |
This seems to be working using 2.7.2bzr31saucy0
Note that 2.8 is not production yet.
Detecting device.. AAAADAQABAAAAYQ DWO5C5lPp06Sa3p 5+J5Jx5Z0QxLp2J N0A/EP+ pR6r+Visyp/ i2ifYwfq/ HUMiZ7JFPfrZ635 WAyvQ6PiNpdAVmG 2xuQK5Rjsr0jVMs M4uoQ5B/ TTzNBpSkvFJ6z4h GIUk= pat@pat-samsung
01acb3051a9f6b24 device usb:2-1.2 product:occam model:Nexus_4 device:mako
* found 1 devices.
Check device image version..
..device version detected.
Check if the device is connected to a network..
1
Detecting if openssh-server is installed..
1:6.2p2-6
..openssh-server (1:6.2p2-6) is installed.
Enabling port forward..
..ports forwarded.
Setting up public key authentication..
Checking for keys..
Host key is:
ssh-rsa AAAAB3NzaC1yc2E
We have following keys on the device:
*no keys*
Deploy the host key to the device..
..key folder created
..key deployed!
..public key authentication is now set.