Avatar of Metalteck
Flag for United States of America

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.
Shell ScriptingUnix OS

Avatar of undefined
Last Comment
Duncan Roe

8/22/2022 - Mon