`ssh-add -x` does not prevent key use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
I add my key:
$ ssh-add -t $((60*60*2)) /media/
After which I physically remove the USB stick with that key and I lock my agent:
$ ssh-add -x
Enter lock password:
Again:
Agent locked.
Then I ssh someplace I shouldn't be able to get to:
$ ssh -v 10.13.37.6
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.13.37.6 [10.13.37.6] port 22.
debug1: Connection established.
debug1: identity file /home/martin/
debug1: identity file /home/martin/
debug1: identity file /home/martin/
debug1: Checking blacklist file /usr/share/
debug1: Checking blacklist file /etc/ssh/
debug1: identity file /home/martin/
debug1: identity file /home/martin/
debug1: identity file /home/martin/
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu5
debug1: match: OpenSSH_5.5p1 Debian-4ubuntu5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_
debug1: expecting SSH2_MSG_
debug1: SSH2_MSG_
debug1: expecting SSH2_MSG_
debug1: Server host key: RSA b9:b0:f8:
debug1: Host '10.13.37.6' is known and matches the RSA host key.
debug1: Found key in /home/martin/
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_
debug1: SSH2_MSG_
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering DSA public key: /home/martin/
debug1: Server accepts key: pkalg ssh-dss blen 435
debug1: Authentication succeeded (publickey).
Authenticated to 10.13.37.6 ([10.13.37.6]:22).
debug1: channel 0: new [client-session]
debug1: Requesting <email address hidden>
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Linux bh-live-02 2.6.35-28-virtual #50-Ubuntu SMP Fri Mar 18 19:16:26 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10
Notably, it says, "debug1: Offering DSA public key: /home/martin/
$ ls -l /home/martin/
ls: cannot access /home/martin/
Also, -l shows a key when it should show none:
$ ssh-add -l
1024 a5:51:2f:
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: openssh-client 1:5.8p1-7ubuntu1
Uname: Linux 3.3.0-030300rc7
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Mar 26 17:52:37 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
RelatedPackageV
ssh-askpass N/A
libpam-ssh N/A
keychain N/A
ssh-askpass-gnome 1:5.8p1-7ubuntu1
SSHClientVersion: OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in openssh (Ubuntu): | |
importance: | Undecided → Low |
Are you using gnome-keyring? (I think that's the default).
If so, gnome-keyring doesn't actually implement ssh-agent locking although it will claim to work.
https:/ /git.gnome. org/browse/ gnome-keyring/ tree/daemon/ ssh-agent/ gkd-ssh- agent-ops. c#n1417
op_ not_implemented _success, /* GKR_SSH_OP_LOCK */ not_implemented _success, /* GKR_SSH_OP_UNLOCK */
op_