Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine ssh config: no need to backup keys #295

Merged
merged 1 commit into from
Aug 9, 2015
Merged

Refine ssh config: no need to backup keys #295

merged 1 commit into from
Aug 9, 2015

Conversation

nkcfan
Copy link
Contributor

@nkcfan nkcfan commented Jul 13, 2014

It is safer to prevent any the credential keys shared or backed up. Normally if computer changed, the user should generate new keys instead of reusing existing ones.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling dcb26ba on nkcfan:ssh into a95a072 on lra:master.

@maxnordlund
Copy link

What's happening with this? I would really se this merged since I don't want to shared my keys with a third-party.

@vitorgalvao
Copy link
Contributor

@maxnordlund
Copy link

Yes and I use that to not sync my .ssh folder, but this pull request selectively syncs just the ssh config, not the private keys to a third party. Which is why I'm wondering about the status of this, since I'd like to sync my ssh config, but not my keys.

@lra
Copy link
Owner

lra commented Aug 26, 2014

You can use this ssh config to overwrite mackup's without a problem, like @vitorgalvao suggested.

@maxnordlund
Copy link

Again, i'd like to sync my ssh config, but mackup syncs my private keys along with it. Which is rather unsettling behavior, since those keys are private and mackup stores them by default in Dropbox unencrypted. Now of course I could run my own fork of mackup, as with all open source software. But I believe that instead of making changes to just my own copy, everyone could benefit from the added security that selectively syncing the ssh config without the keys would entail.

Ping @nkcfan to please rebase on current master to make it easily mergeable.

@MadeOfMagicAndWires
Copy link
Contributor

@maxnordlund

What @lra means is you can drop the ssh.cfg from this pull request into your ~/.mackup/ directory, and it will overwrite the system default. This way it will sync ssh, using @nkcfan's configuration.
This method works for every .cfg file shipped with mackup.

@lra lra merged commit dcb26ba into lra:master Aug 9, 2015
@lra
Copy link
Owner

lra commented Aug 9, 2015

Merged, so this is now the default =)
People who wants to sync their passphrased keys should create a ~/.mackup/ssh.cfg file with this content:

[application]
name = SSH

[configuration_files]
.ssh

@lra
Copy link
Owner

lra commented Aug 9, 2015

(will release tonight)

@ponychicken
Copy link
Contributor

thanks!

@maxnordlund
Copy link

Thank you @lra

@viing937
Copy link

viing937 commented Feb 13, 2017

Now backup will not sync my private keys, but --help have a wrong note.

 2. backup: sync your conf files to your synced storage, use this the 1st time
    you use Mackup. (Note that by default this will sync private keys used by
    OpenSSH and GnuPG.)
By default, Mackup syncs all application data (including private keys!) via
Dropbox, but may be configured to exclude applications or use a different
backend with a .mackup.cfg file.
$ mackup --version
Mackup 0.8.16

I have a pull request about this, #976.

@brandontamm
Copy link

@lra - I am attempting to sync .ssh folder and created the config file like you mentioned above and used 'mackup backup' and received the following error:
➜ .mackup mackup backup
Backing up .ssh ...
A folder named $EDITED-FILE-LOCATION$/Mackup/.ssh already exists in the backup.
Are you sure that you want to replace it ? <Yes|No>Yes
Traceback (most recent call last):
File "/usr/local/Cellar/mackup/0.8.16/libexec/bin/mackup", line 9, in
load_entry_point('mackup==0.8.16', 'console_scripts', 'mackup')()
File "/usr/local/Cellar/mackup/0.8.16/libexec/lib/python2.7/site-packages/mackup/main.py", line 90, in main
app.backup()
File "/usr/local/Cellar/mackup/0.8.16/libexec/lib/python2.7/site-packages/mackup/application.py", line 107, in backup
utils.copy(home_filepath, mackup_filepath)
File "/usr/local/Cellar/mackup/0.8.16/libexec/lib/python2.7/site-packages/mackup/utils.py", line 105, in copy
shutil.copytree(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
shutil.Error: [('$EDITED-FILE-LOCATION$/.ssh/config', '$EDITED-FILE-LOCATION$/Mackup/.ssh/config', "[Errno 2] No such file or directory: '$EDITED-FILE-LOCATION$/.ssh/config'")]

@brandontamm
Copy link

I noticed that the config file is symlinked. I installed mackup using homebrew and I am assuming there is a file path issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants