Question

I want to develop a command line to login the ftp server with username & password. The script would be run on AIX 6.1, but now I was stuck.
I have searched on google and got some solutions, but no one works. See commands I have tried below:

    ftp ftp://username:password@server  
    ftp username:password@server  
    ftp server /user:username /password:password  
    ftp USER username PASS password

Could you please tell me the correct command?
Thanks.

Was it helpful?

Solution

Create a text file in your home directory named .netrc containing:

machine myserver.example.com login myusername password mypassword

However it would be more secure to set up ssl and use scp. There's little reason to use an insecure protocol like ftp.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top