Syncing SSH config

By Eoin on 18 December 2011.

You can set up SSH to connect without requiring a password each time.

SSH config

It’s handy to configure SSH connections.

For example, you can keep all SSH connections alive by default.

Edit ~/.ssh/config and add the following command:

    Host * 
        ServerAliveInterval 240

Sync the config between your computers

But you still have to set that config file on your different computers.

Enter Dropbox. Store the config file in Dropbox, and point a symbolic link to it so that SSH on your computer will use that configuration.

  1. Create a folder under Dropbox, named .ssh for example.
  2. Copy ~/.ssh/config to ~/Dropbox/.ssh/
  3. Rename ~/.ssh/config to ~/.ssh/backup.config
  4. Make a symbolic link so that your Dropbox config will be found by your SSH:
    `ln -s ~/Dropbox/.ssh/config ~./ssh/config`


Now you can edit SSH’s config in Dropbox, and it will update on the rest of your machines.

But is there a more intelligent way of doing this?

About and Contact · All posts