Setting up .megarc


If you do not want to pass a credentials file then you can set up a file in your home directory named .megarc

See Megatools - megarc page for more information.


# cd ~
# nano .megarc



The contents of your .megarc file should look similar to the following.


[Login]
Username = megauser@example.com
Password = fisudiusfus7897f9s8fuf2joi2i23ijljasdfusd


After your create and save your .megarc file you need to secure it by giving access to the owner only for read and write.


# chmod 0600 ~/.megarc


Remarks

Now that you created a .megarc file it is not necessary to pass in credentials to any of the Mega Scripts.

However if you want to use more then one Mega.nz account for the same user then you can create file with a different name such as .megarc_other and pass the location of that script in as the credentials to be used. Secure any extra credential files as you did with the .megarc file.