Can I have two SFTP SSH clients using same ssh user name but different public/private keys connect to a target server, the server has both the public keys configured?

Currently from one of the client the SFTP connectivity can be established, but the second one not able to?

Experts, please provide the solution?

  • 3
    Is this a theoretical question (can I) or a practical one (second client cannot connect)? If the latter, we need more details about the error(s). – Jeff Schaller May 17 '16 at 12:12
  • Try connecting with ssh -vvv to get useful error message. – Juraj May 17 '16 at 13:29

The answer is Yes. You can have N public keys in authorized_keys; the same user can use two of them from two locations or even from just one location.

Note that even though the public key may indicate where the key was generated and for whom, that's just decoration. Only the key itself controls whether or not it will be honored.

| improve this answer | |

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.