Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am writing a simple script using ncftp as a client to synchronize my files with an online server. My script needs my ftp password to work.
I'm concerned about security. Is it enough to change the file permissions to make it invisible to other users? Is there a way to scramble the password to make it illegible for others? Do you recommend another ftp client (sftp)?
generally i'd suggest sftp with preshared keys, but note that sftp is *NOT* an ftp client. it's an emulation of the ftp protocol over ssh, so does not use an ftp server to connect to at the other end.
Then you don't need to put the user/pass in the script.
The ftp client will look in that file. And the file will only be readable to you. Actually, the ftp client will not use it if it is not 700.
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152
Rep:
something like sftp or scp with preshared keys would be more secure especially if you are worried about people intercepting the data. if you are just worried about people finding your password in the script then just 'chmod 700' it and to read the script they would have to have either already gained access to your user or root account or have physical access to the machine (in either case you have bigger problems anyways)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.