Ssh identity rollbacks when workspace is restarted

ssh

#1

Hi,

I’m trying to copy SSH identity files from my local pc to cloud9 workspace. So I copied over id_rsa and id_rsa.pub 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?

Thanks


#2

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

Host *
	IdentityFile ~/.ssh/id_rsa_home

#3

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 id_rsa.pub back to default upon workspace restart in case users accidentally break or overwrite them.