bash - Transforming a sftp shell script command into a ftp command -


I've been writing my first shell script ever and trying to understand how to change this command: / P>

  sftp -o IdentityFile = / home / test / test / id_dsa test@test.test.com & lt; Sftp_put.txt;   

In equivalent command where I connect to an FTP server. The main difference is that I am entering this server through a username and password, not my SSP credentials. Note: I am trying to upload two files.

Again any help would be appreciated!

You can use .netrc for it:

  $ cat> .netrc Machine your.machine.ip.address Log in your.login.name ^ D $ ftp your.machine.ip.address & lt; Ftp_cmds.txt   

will prompt you for a password if you are ok with it, you can save password (clear text) in .netrc to leave this prompt. See man netrc for more information.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -