Operating System - HP-UX
1833538 Members
2913 Online
110061 Solutions
New Discussion

How to install "expect" and use it with ssh ftp?

 
SOLVED
Go to solution
Clement_7
Occasional Advisor

How to install "expect" and use it with ssh ftp?

Hi All, I am having problem installing Tcl before installing expect. Please help to direct the correct procedure or version for HPUX 11.0...
7 REPLIES 7
V.Tamilvanan
Honored Contributor
Solution

Re: How to install "expect" and use it with ssh ftp?

Hi Clement,

This link should definitely help you.


http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140032
V.Tamilvanan
Honored Contributor

Re: How to install "expect" and use it with ssh ftp?


Hi Clement,

Ignore the earlier post. You can download from the below link for 11.0. All the information also available there.


http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.41/
Clement_7
Occasional Advisor

Re: How to install "expect" and use it with ssh ftp?

How to install?? Do we still need to install Tcl before installing this software.
Steven E. Protter
Exalted Contributor

Re: How to install "expect" and use it with ssh ftp?

on the page on the last link there are a list of run/install time requirements.

You need to have all of those on your system prior to installion.

Download and gunzip the depot file


to install:

swinstall -s \*

That will run the installer
watch the output and respond to errors.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
V.Tamilvanan
Honored Contributor

Re: How to install "expect" and use it with ssh ftp?

Hi Clement,

Please don't assign any points for wrong answers and incomplete answer. If you assign full points for an incomplete answer no body is going to help you becoz the query will be signed with "Magic Symbol" as it is closed.
Clement_7
Occasional Advisor

Re: How to install "expect" and use it with ssh ftp?

Oh i see, thks for informing me on that.
rmueller58
Valued Contributor

Re: How to install "expect" and use it with ssh ftp?

we've been using expect scripts to run either sftp or ftp for sometime.
#!/usr/local/bin/expect --
spawn ftp
expect "Name: "
send "user\r"
expect "331:"
expect "Password:"
send "password\r"
expect "ftp> "
send "prompt\r"
expect "ftp> "
send "mput filename\r"
expect "ftp> "
send "quit\r"
send "\r"

with sftp it requires a different syntax, if you are trying to do batch mode or croned processes, you will have to review the sftp man pages, I believe the syntax requires

example:

#!/usr/bin/expect
spawn sftp user@host
expect "password:"
send "REAL PASSWORD\r"
expect "sftp> "
send "lcd CORRECT LOCAL DIRECTORY\r"
expect "sftp> "
send "cd CORRECT REMOTE DIRECTORY\r"
expect "sftp> "
send "put FILENAME\r"
expect "sftp> "
send "quit\r"