phablet-shell conflicts with how SDK sets up ssh keys

Bug #1355286 reported by Zygmunt Krynicki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtcreator-plugin-ubuntu
Won't Fix
Undecided
Unassigned
phablet-tools (Ubuntu)
High
Oliver Grawert

Bug Description

This is a long story but I'll try to summarize it:

1) phablet-shell guesses which key to overwrite the on-devie ~/.ssh/authorized_keys file with. It picks the most recently modified file
2) the SDK uses per-device key
3) using both tools together, interchanged with plugging additional devices and using phablet-shell to debug and analyze stuff will effectively lock out the SDK from the device

This all boils down to lack of a common API for interacting with devices and two unsynchronized implementations stepping on each others toes.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: phablet-tools 1.1+14.10.20140715-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-6.11-generic 3.16.0-rc7
Uname: Linux 3.16.0-6-generic x86_64
ApportVersion: 2.14.5-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Aug 11 18:22:06 2014
InstallationDate: Installed on 2014-01-15 (207 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140115)
PackageArchitecture: all
SourcePackage: phablet-tools
SystemImageInfo:
 current build number: 0
 device name:
 channel: daily
 last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

FYI: I've created python3-phablet API https://github.com/zyga/python-phablet that could be used by both tools. I'll talk to both upstreams to suggest this

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

Out of curiousity, why does phablet-shell not add the key it needs to
authorized_keys instead of completely overwriting it.
This is what the SDK does:

echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2

Also we do not use keys per device anymore but create one key in ~/.config/ubuntu-sdk/ubuntudevice_id_rsa
which is used for all devices.

Oliver Grawert (ogra)
Changed in phablet-tools (Ubuntu):
assignee: nobody → Oliver Grawert (ogra)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

The problem will be fixed in phablet-shell so it adds the new key to autorized_keys2 instead of replacing it with
a new file

Changed in qtcreator-plugin-ubuntu:
status: New → Won't Fix
Revision history for this message
Oliver Grawert (ogra) wrote :

that will need a little more, we dont just want to grow authorized_keys infinitely :) so there need to be some checks, but yet, fully agreed, i will work on this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phablet-tools - 1.1+14.10.20140918-0ubuntu1

---------------
phablet-tools (1.1+14.10.20140918-0ubuntu1) utopic; urgency=low

  [ Oliver Grawert ]
  * 'phablet-shell: only start/stop ssh if it is not already running, do
    not wipe authorized_keys (breaks the SDK) and instead only append
    the key if it is not there yet. make sure ~/.ssh exists before
    trying to do anything with it (LP: #1355286) (LP: #1337289) (LP:
    #1326805) (LP: #1337289, #1326805, #1355286)

  [ nskaggs ]
  * Make phablet-test-run use only python3 and the autopilot3 binary.
    Fixes bug 1321463 and bug 1364369 (LP: #1364369, #1321463)
 -- Ubuntu daily release <email address hidden> Thu, 18 Sep 2014 11:52:02 +0000

Changed in phablet-tools (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers