Question : Problem: sftp expect script

I am using solaris 8 sparc Operating system. Its has sftp installed and expect and tcl package also installed. Now I need to write a script   and automate sftp . I need a script which includes sftp and expect.

sftp username :sftpuser1
password :  pass123
Servername IP  : 192.178.7.1
File to copy from localserver to 192.178.7.1 : file1.

Note: Here its not possible to use ssh keys.

Answer : Problem: sftp expect script

can confirm that the path ( /usr/local/bin/expect) to expect is correct? it could be different for your system

also, can you make the script executable and you call it by its name directly. e.g.

chmod +x myscript
./myscript
Random Solutions  
 
programming4us programming4us