ssh-import-id exits fail (1) if all keys already authorized

Bug #1285295 reported by Scott Moser on 2014-02-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssh-import-id (Ubuntu)
Medium
Dustin Kirkland 

Bug Description

running 'ssh-import-id <id>' more than once for the same user will result in failure on runs other than the first.
this seems wrong.

$ rm -f ~/.ssh/authorized_keys
$ ssh-import-id smoser
2014-02-26 18:24:39,340 INFO Authorized key ['2048', 'e3:66:78:32:7f:84:81:72:38:81:01:63:74:82:e3:6a', 'smoser@brickies-canonical', '(RSA)']
2014-02-26 18:24:39,343 INFO Authorized key ['2048', '21:ea:6f:5d:f9:32:8a:da:98:77:70:22:48:94:b6:42', 'smoser@bart-canonical', '(RSA)']
2014-02-26 18:24:39,347 INFO Authorized key ['2048', '7b:e2:5e:1a:c0:ac:a7:17:51:0b:41:4b:37:ad:05:b2', 'smoser@kaypeah', '(RSA)']
2014-02-26 18:24:39,347 INFO Authorized [3] SSH keys
$ echo $?
0
$ ssh-import-id smoser
2014-02-26 18:24:53,143 INFO Already authorized ['2048', 'e3:66:78:32:7f:84:81:72:38:81:01:63:74:82:e3:6a', 'smoser@brickies-canonical', '(RSA)']
2014-02-26 18:24:53,148 INFO Already authorized ['2048', '21:ea:6f:5d:f9:32:8a:da:98:77:70:22:48:94:b6:42', 'smoser@bart-canonical', '(RSA)']
2014-02-26 18:24:53,153 INFO Already authorized ['2048', '7b:e2:5e:1a:c0:ac:a7:17:51:0b:41:4b:37:ad:05:b2', 'smoser@kaypeah', '(RSA)']
2014-02-26 18:24:53,154 INFO Authorized [0] SSH keys
2014-02-26 18:24:53,154 ERROR No matching keys found for [smoser]
$ echo $?
1
$ dpkg-query --show ssh-import-id
ssh-import-id 3.20-0ubuntu1

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ssh-import-id 3.20-0ubuntu1
ProcVersionSignature: User Name 3.13.0-12.32-generic 3.13.4
Uname: Linux 3.13.0-12-generic x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
Date: Wed Feb 26 18:23:57 2014
Ec2AMI: ami-00000794
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000548
Ec2Ramdisk: ari-00000548
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ssh-import-id
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Changed in ssh-import-id (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland  (kirkland)
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ssh-import-id - 3.21-0ubuntu1

---------------
ssh-import-id (3.21-0ubuntu1) trusty; urgency=low

  * bin/ssh-import-id: LP: #1285295
    - re-authorizing existing keys should exit 0
    - update logging
 -- Dustin Kirkland <email address hidden> Thu, 30 Jan 2014 09:23:00 +0000

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

Other bug subscribers