I have read through several threads (which have been helpful) and I'm still getting an error when trying to sftp a file (client wants it to be sftp'ed)
Here is the script:
#!/bin/bash
HOST=XX.XX.XX.XX
PORT=XXXX
USER=root
FILE=/tmp/RANDY
/usr/bin/expect<<EOD
spawn sftp -o Port=$PORT $USER@$HOST
expect "sftp>"
spawn put $FILE
interact
EOD
The error I am receiving is:
spawn sftp -oP
I'm trying to write a shell script to transfer files to a remote windows machine which is running a ultra simple sftp server .
So i don't have the option of using public key authentication.
From the Linux end its a stripped down version for non intel platform , So if i want to use "expect" i cant install expect/tcl/tk.
Hi Experts,
I am a beginner here in the forum and would like to help a renowned forum to continue in my work. I have a script like that sftp and after its termination, it would continue with the rest of the code.
Can be "calling" the other script, or continuing with the rest of the code.
I have written a Unix Script to automate the process of File transfer from Our server to vendor Server but the automation Script fail when Progress meter is around 65-70% Complete.
We have 5 servers running our code: A, B , C, D and E.
From local machine, we sftp the file to A.
Then ssh id@A
su - applicationname
sftp id@A
get
bye
tar -xzf
logout
logout
The same procedure we apply for others B to E.
Is there any way we can simplify this using script ?
We have requested linux team to provide passwordless authentication.
I have read documentation on SCP and just trying to figure out how go about doing this - below are two pieces of code, one is SFTP and one is SCP. My goal is to have this done via password-less authentication, fully automated.
I'm trying to upload files to a VPS over SFTP. Unfortunately, I'm having a strange problem.
While uploading a file over SFTP as root, the transfer appears to randomly stops somewhere in the first few KB. Filezilla reports that the connection timed out, and Cyberduck reports that the socket was closed.
Hi,
How to use SFTP to get the files on unix server from anoter unix server without sending the password.
This is below script wrote
------------------------------------
#!/bin/ksh
#!/usr/local/bin/expect
sftp -oPort=<PORt_number> <Ipaddress> <<EOF
expect "password:"
send <password>
cd /test/test1
mget *.csv
bye
EOF
---------------------------------------
after runni