I am way out of my element on this and hope someone can help.
Using Scott Klement's article (
http://systeminetwork.com/article/ssh-scp-and-sftp-tools-openssh) I am
trying to send files to a vendor using SFTP. I am forced, by the vendor,
to use the password authentication method. I have created my EXPECT file
and processed it through the following:

CALL QP2SHELL PARM('/usr/local/bin/expect' '-df' '/home/mkirkpat/
myexpectscript')

The EXPECT script is as follows (the PUT stmt has been removed):
#!/usr/local/bin/expect -f
spawn sftp WDS16000@xxxxxxxxxxxxxxxxxxxx
expect "Password:"
send "xxxx\n"
expect "sftp>"
send "quit\n"
exit

The following is displayed when executing the script(it looks like it may
be missing stty):

expect version 5.43.0
argv[0] = /usr/local/bin/expect argv[1] = -df argv[2] =
/home/mkirkpat/myexpectscript set argc 0
set argv0 "/home/mkirkpat/myexpectscript"
set argv ""
executing commands from command file /home/mkirkpat/myexpectscript
spawn sftp WDS16000@xxxxxxxxxxxxxxxxxxxx
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {805}

expect: does "" (spawn_id exp3) match glob pattern "Password:"? no
sh: /usr/local/bin/stty: not found.

expect: does "sh: /usr/local/bin/stty: not found.\r\n" (spawn_id exp3)
match
glob pattern "Password:"? no

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to "
(spawn_
id exp3) match glob pattern "Password:"? no

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com" (spawn_id exp3) match glob pattern "Password:"? no
Connecting to ftp.pscinfogroup.com...

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com...\r\n" (spawn_id exp3) match glob pattern "Password:"? no
The authenticity of host 'ftp.pscinfogroup.com (216.178.78.98)' can't be
esta
blished.
. key fingerprint is DSA.

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com...\r\nThe authenticity of host 'ftp.pscinfogroup.com
(216.178.78.
98)' can't be established.\r\n . key fingerprint is DSA.\r\n Are you sure
you
want to continue connecting (yes/no)? " (spawn_id exp3) match glob
pattern "
Password:"? no
expect: timed out
send: sending "xxxx\n" to { exp3 }

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com...\r\nThe authenticity of host 'ftp.pscinfogroup.com
(216.178.78.
98)' can't be established.\r\n . key fingerprint is DSA.\r\n Are you sure
you
want to continue connecting (yes/no)? " (spawn_id exp3) match glob
pattern "
sftp>"? no
Are you sure you want to continue connecting (yes/no)? xxxx

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com...\r\nThe authenticity of host 'ftp.pscinfogroup.com
(216.178.78.
98)' can't be established.\r\n . key fingerprint is DSA.\r\n Are you sure
you
want to continue connecting (yes/no)? xxxx\r\n" (spawn_id exp3) match gl
ob pattern "sftp>"? no

expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
ftp.pscin
fogroup.com...\r\nThe authenticity of host 'ftp.pscinfogroup.com
(216.178.78.
98)' can't be established.\r\n . key fingerprint is DSA.\r\n Are you sure
you
want to continue connecting (yes/no)? nhsn@61!\r\nPlease type 'yes' or
'no':
" (spawn_id exp3) match glob pattern "sftp>"? no
expect: timed out
send: sending "quit\n" to { exp3 }
Please type 'yes' or 'no':
Press ENTER to end terminal session.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].