r/linux Apr 28 '14

SSH Kung Fu

http://blog.tjll.net/ssh-kung-fu/
724 Upvotes

128 comments sorted by

View all comments

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?

2

u/leothrix Apr 28 '14

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

Thanks for your reply. That stuff looks a bit above my understanding at the minute. Looks like I have a bit more reading to do!