Persistent SSH and Terminal configs

Your SSH keys and configuration files (like .ssh or .gitconfig) are typically saved in the home directory. However, since the home directory is ephemeral, any changes you make to these files disappear when your container restarts.

The most common use case for this is Git integration, and the remote access via SSH. By persisting your SSH keys, you can upload a single public key to GitHub (or similar hosting) and maintain access across container restarts or when launching new containers. Since your cloned projects are already stored in your personal storage folders, persisting your identity allows you to push and pull changes seamlessly without re-authenticating every session.

To maintain persistent changes, we rely on the persistence pattern: store the actual data in your persistent volume and link it to the system.

The Problem: Ephemeral .ssh

The system expects your SSH keys to be in ~/.ssh. If you create them there, they are lost on restart. This is important if you are working for example with git repositories, and you want to use a consistent ssh key for your work in SciServer.


Other Identity Files

You can use this same pattern for other configuration files:

  • Git Config: Move .gitconfig to ~/workspace/Storage/$SCISERVER_USER/persistent/ and link it in your .bashrc.