Encrypt passwords in Scripts?

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
Funkbuqet
Posts: 5
Joined: Sun May 01, 2011 2:30 am

Encrypt passwords in Scripts?

Post by Funkbuqet »

Does anyone know is there a way to encrypt the transmission-remote password for use in a script?

I currently have a script that runs after completion using transmission-remote commands, but i have to include my password in plain text within the script. I would like to encrypt the password so anyone that view the script can't see my password. i attempted copying the encrypted password from seetings.json and using it, but (as expected) that didn't work. Any help is appreciated. Thanks.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Encrypt passwords in Scripts?

Post by rb07 »

No need to encrypt or use the plain text password, transmission-remote has a couple of options to avoid security risks:

Code: Select all

$ transmission-remote -h
transmission-remote 2.50 (13228)
...
 -ne  --authenv                            Set authentication info from the
                                           TR_AUTH environment variable
                                           (user:pw)
 -N   --netrc                  <file>      Set authentication info from a .netrc
                                           file
...
Last edited by rb07 on Sat Feb 18, 2012 4:55 pm, edited 1 time in total.
Funkbuqet
Posts: 5
Joined: Sun May 01, 2011 2:30 am

Re: Encrypt passwords in Scripts?

Post by Funkbuqet »

Thank you.

Using .netrc is better than what i was doing, and with permission set to 0400 it should be secure.
Post Reply