There seem to be a file size limit for sftp transfer from the command line, if I try to download a 20 MB file it stops at 20% when the transfered data is larger than 4 MB:
/myfile.xml 22% 4480KB 410.4KB/s 00:38 ETA
Is there a limit somewhere and how can you change it? I use a scripted sftp connection with expect. Downloading the file via Nautilus file manager or sftp from the console without shell script and expect program both seem to work. The script is as follows:
#!/usr/bin/expect
# usage: ./sftp_import.sh username host password filepath localpath
set username [lindex $argv 0]
set host [lindex $argv 1]
set password [lindex $argv 2]
set filepath [lindex $argv 3]
set localpath [lindex $argv 4]
spawn sftp $username@$host
expect "password:"
send "$password\r";
expect "sftp>"
send "get $filepath $localpath\r"
expect "sftp>"
send "bye \r";
exit 0