Let me explain my question. I am working on an Internet Appliance device (IOT). The device currently runs an SSH server rather nicely. You can SSH to it and configure it, look at stats, etc. I now need to add a feature in which the device periodically uploads its logs via SFTP to a server that does not allow password logins/authentication, just public key.

For reasons that I won't bore you with here, it would be much more convenient if I could use the same public/private key pair for the SFTP session. Generating and storing a new key safely on this device is rather complicated. It is not Linux based device but rather runs a proprietary RTOS.

I cannot think of any security risks, but I thought I would ask. Is there something that I have overlooked? Is there a reason not to do this?

Only the public key is disclosed in either case.


1 Answer 1


Using the same private key for more than one purpose is usually a bad idea, because of the risk that you might be tricked into signing something in the first capacity, that might be used to impersonate you in the second capacity.

More precisely, is there a risk that a client connecting to your server, might trick your server into generating a signature that could be used to authenticate you to the SFTP server?

The SSH Public Key Authentication protocol does however appear to be sufficiently inconsistent with the SSH Key Agreement protocol to rule out that attack vector.

The SSH Security Considerations do not explicitly cover this question.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .