2

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?

1 Answer 1

5

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

Daily use:

encfs ~/.passwords.encfs ~/.passwords.d
ftp …
fusermount -u ~/.passwords.d
4
  • Wow, that's great! In you opinion, would that encrypted directory be safe to upload to a remote backup location? May 16, 2011 at 18:56
  • I connect to most things via SFTP/SCP, but some clients' production servers are FTP only. May 16, 2011 at 18:57
  • 1
    @mattalexx: Yes, you can back up the encrypted directory. Of course, make sure your password is strong enough to withstand brute force attacks. May 16, 2011 at 19:07
  • FTP is insecure, all traffic is plain text, no encription (not even passwords!).
    – vonbrand
    Jan 26, 2013 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.