ssh-import-id exits fail (1) if all keys already authorized
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ssh-import-id (Ubuntu) |
Fix Released
|
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/
$ ssh-import-id smoser
2014-02-26 18:24:39,340 INFO Authorized key ['2048', 'e3:66:
2014-02-26 18:24:39,343 INFO Authorized key ['2048', '21:ea:
2014-02-26 18:24:39,347 INFO Authorized key ['2048', '7b:e2:
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:
2014-02-26 18:24:53,148 INFO Already authorized ['2048', '21:ea:
2014-02-26 18:24:53,153 INFO Already authorized ['2048', '7b:e2:
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
ProcVersionSign
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
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000548
Ec2Ramdisk: ari-00000548
PackageArchitec
ProcEnviron:
TERM=screen
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ssh-import-id
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in ssh-import-id (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Dustin Kirkland (kirkland) |
status: | New → Fix Committed |
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