Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Unable to do SFTP using expect

$
0
0
Hi,
I am trying to sftp using expect, but not getting through as it prompt for password is coming

Following is the code
Code:


#/usr/bin/expect > output.log
sftp medcdr@10.130.254.50
expect "password:"
send "Med@Cdr12\n"
expect "sftp>"
send "put ZTE_*201505*\r"
expect "sftp>"
send "bye\r"
EOF

output is as follows:

Code:

Connecting to 10.130.254.50...
medcdr@10.130.254.50's password:


Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images