Link to home
Create AccountLog in
Avatar of Metalteck
MetalteckFlag 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.
SOLUTION
Avatar of Hanno P.S.
Hanno P.S.
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.