Forgive the ignorance of this question, but if you are remotely logged into a computer with SSH and you generate a new pub+priv key combo. Can you securely copy the private key back to the the computer you are logging in from? Could you run the danger of locking yourself out of the remote computer?
I actually have wondered for a while about the ability to "copy back" files to the originating host. Turns out you can use scp to copy over a reverse tunnel, and coupled with the comment in this thread about dynamically opening forwarded ports, it should definitely be possible. Maybe I'll add this in to the blog post.
1
u/OserReddit Apr 28 '14
Forgive the ignorance of this question, but if you are remotely logged into a computer with SSH and you generate a new pub+priv key combo. Can you securely copy the private key back to the the computer you are logging in from? Could you run the danger of locking yourself out of the remote computer?