1

Let's say in my computer running Debian i have an RSA key pair generated by user foo and copied the public key to server_A for allowing key based authentication in ssh for foo.

Now my question is can i use the same key-pair for user bar and loo to allow key based authentication for them on server_A or do i need to create a separate key pair for each user?

1

If you don't care about security, you can do that.

Otherwise, you absolutely need a different key pair for each user. If multiple users share the same private key, they can easily impersonate each other. If you're only doing key authentication (no passwords) then they can log into each other's accounts.

| improve this answer | |
  • but if the OP is ok with that, can it be possible? – schroeder Feb 25 '15 at 0:16
  • 1
    It's possible to do that, but it defeats the purpose of key authentication. – Justin Feb 25 '15 at 0:17
  • @JustinLardinois: If i want to do so then copying the public key to the server for all users and private key to all users home should do, right? – ramel Feb 25 '15 at 0:26
  • I guessed the OP was ok with that ..... :) – schroeder Feb 25 '15 at 0:28
  • 2
    if you do that, foo can ssh into bar's account by doing ssh bar@server_A. You might as well create a single user and ask foo, bar and loo to use the same user account. – limbenjamin Feb 25 '15 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.