Hi,
I'm still relatively new at programing TCL.
I am trying to send a file using SFTP (I have it working well with FTP), this is the code I use:
set pipe [open "|sftp $server" w+]
fconfigure $pipe -blocking 0 -buffering line
puts $pipe "$pass"
puts $pipe "put $localfile $remotefile"
puts $pipe "exit"
close $pipe
return 1
It sends the "user@host password's" input to the console and just stops processing without sending the file. It works quite well using FTP but has me stumped with SFTP.
Any suggestions?
Thank you,
Johnny
I'm still relatively new at programing TCL.
I am trying to send a file using SFTP (I have it working well with FTP), this is the code I use:
set pipe [open "|sftp $server" w+]
fconfigure $pipe -blocking 0 -buffering line
puts $pipe "$pass"
puts $pipe "put $localfile $remotefile"
puts $pipe "exit"
close $pipe
return 1
It sends the "user@host password's" input to the console and just stops processing without sending the file. It works quite well using FTP but has me stumped with SFTP.
Any suggestions?
Thank you,
Johnny