Ssh identity rollbacks when workspace is restarted




I’m trying to copy SSH identity files from my local pc to cloud9 workspace. So I copied over id_rsa and and changed permission accordingly. It works fine and I can login to my remote servers from c9. But after restarting c9, the identity files are restored to original files. How do I permanantly keep the copied keys on the server?



For now, I got it working by specifying alternate identity file in ~/.ssh/config:

Host *
	IdentityFile ~/.ssh/id_rsa_home


That’s the best way to do it. You should create new keys in the .ssh folder for any you want to add. We reset id_rsa and back to default upon workspace restart in case users accidentally break or overwrite them.