How to specify username and password in ftp command?
Use a .netrc
file in your home directory.
The content is:
# machine <hostname> login <username> password <password>
machine ftp.example.com login myuser password $ecret
If this is something you're doing programmatically, write the .netrc
before connecting, delete it when you're done.