Metalteck
asked on
Correct syntax to upload file in a script using sftp
I just had a vendor change their server from ftp to sftp.
I was using the following code in my script:
ftp -in $HOST <<- EOF
user $USER $PASS
But was told this wouldn't work anymore since I now have to connect using the sftp command.
Can someone let me know what the proper syntax I need to use in order to upload a file to a sftp server.
I was using the following code in my script:
ftp -in $HOST <<- EOF
user $USER $PASS
But was told this wouldn't work anymore since I now have to connect using the sftp command.
Can someone let me know what the proper syntax I need to use in order to upload a file to a sftp server.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.