Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 21, 2015, 6:01 pm
rate this thread
User foo on machine bar generates a keypair, and provides the public key
to remote user dokes on machine shme . foo connects to dokes account
at shme, and everything is happy.
Then user foo also has an account on machine baz. He takes the private
key he generated on machine bar, and copies it to machine baz. Can he
connect to dokes on shme? My limited testing suggests that it works.
Is that a universal truth?
Next, foo passes his private key to unrelated user thud on machine
grunt. thud installs the private key owned by foo. Can thud now
connect to user dokes on machine shme?
Next, replace the above ssh keys with PGP keys. Do the same answers apply?
- Richard Kettlewell
November 22, 2015, 2:09 pm
Re: Are ssh keys tied to a user or the originating machine?
The keys are not ‘tied’ to anything. When you permit access to a public
key (in .ssh/authorized_keys), any holder of the corresponding private
key can authenticate.
Copying private keys around is not a great strategy. Consider what
happens when one of the accounts holding the private key is compromised.
Your response to this situation is to remove the corresponding key from
all .ssh/authorized_keys files; i.e. to revoke all access from that key
to anything. If you have the same private key on multiple machines then
the effect is to revoke access from all those machines, even if only one
of them was compromised.
I’d suggest that the only good reason to do this is if there is some
difficulty with having multiple entries in (the equivalent of)
In short although the keys are not physically connected to user or host,
it’s probably best to treat them as if they were.
The same is true of PGP. Any holder of a private key can create
signatures or decrypt received messages (assuming it is a
signature-capable or decryption-capable key, respectively).
- » Cloud Ace Technologies is offering Implementation Services on Cloud Computing, Cloud Serv...
- — Newest thread in » Linux Security