How migrate my keyring (containing ssh passprases, nautilus remote filesystem, pgp passwords) and network manager connections?

Wifi Passwords

So as a partial solution I can confirm that migration of network manager passwords for wifi connections was successful. The procedure for network-manager passwords is:

  1. Stop network-manager:

    sudo service network-manager stop
    
  2. Copy the necessary files in /etc/NetworkManager/ with:

    sudo cp -r /BACKUPDESTINATION/etc/NetworkManager/{system-connections/,VPN} /etc/
    
  3. Restart network-manager:

    sudo service network-manager start
    

And you're done. I still haven't figured out how to copy passwords in the keyring (for ssh, gpg and remote-filesystems). It drives me mad!

Migrate keys and passwords

Finally I know, what was wrong. First of all the keys moved from the old ~/.gnome2/keyrings to the new ~/.local/share/keyrings. Probably due to the switch from Gnome to Unity. Also there seem to be additional files there, aside from the usual login.keyring and user.keystore. At least there where for me after a fresh install. Those hinder migration and I had to delete them.

As mentioned both user ID and user password on my new system matched their counterparts on the old system. If for you they don't, it might probably work to set the password on your old installation to blank (i.e. change your password to no password / empty password). Do that prior to backing up your old system.

Now here is what I did:

  1. Backup the keyfile of the fresh installation in case something goes wrong:

    mv ~/.local/share/keyrings ~/.local/share/oldkeyrings
    

    Using move also makes sure that the other new files in ~/.local/share/keyrings are not there to interfere.

  2. Copy the old keyring to the fresh installation:

    mkdir ~/.local/share/keyrings && cp -r /BACKUPDESTINATION/home/$USER/.gnome2/keyrings/{login.keyring,user.keystore} ~/.local/share/keyrings
    

    For gpg keys you'll have to copy ~/.gnupg over to the new install as well.

  3. Make sure only you can access them and own them:

    sudo chmod -R 600 ~/.local/share/keyrings/ && sudo chown -R $USER:$USER ~/.local/share/keyrings
    

    (might not be necessary)

  4. Log out and back in again