I want to be able to store the login details all of my remote FTP accounts in one place, securely. Then I'd like clients like autofs/curlftpfs, Filezilla, etc to use this one store of passwords. I'm not interested in GUI-dependent solutions. Is this possible somehow?
Ideally those would be SFTP accounts, using SSH public key authentication rather than passwords. You'd gain both security and convenience. But let's assume you don't have a choice of not using FTP with passwords.
You could store the passwords (the
.netrc file) on an encrypted filesystem and mount that filesystem only when you want to access it. A simple way to create an encrypted directory tree is encfs. Setup:
# install encfs, e.g. apt-get install encfs mkdir ~/.passwords.d encfs ~/.passwords.encfs ~/.passwords.d mv ~/.netrc ~/.passwords.d ln -s .passwords.d/.netrc ~ fusermount -u ~/.passwords.d
encfs ~/.passwords.encfs ~/.passwords.d ftp … fusermount -u ~/.passwords.d