10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to sftp using expect, but not getting through as it prompt for password is coming
Following is the 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"... (7 Replies)
Discussion started by: siramitsharma
7 Replies
2. Shell Programming and Scripting
I have to send few gzipped files from local server to SFTP server.
My Server Info
Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
Created a bash script and could able to send files to sftp, but i want to send email if transfer is successful.
... (1 Reply)
Discussion started by: krux_rap
1 Replies
3. Shell Programming and Scripting
Hi,
I am writing a script to enter into a list of servers and take the backup of the cronjobs on that servers...
==============================
-bash-3.00$ expect spawn.exp ssh rcdn6-vm59-33
spawn ssh servers1 /CODE]====================
-bash-3.00$ cat spawn.exp
#!/usr/bin/expect
eval... (1 Reply)
Discussion started by: satishkumar432
1 Replies
4. Shell Programming and Scripting
I am trying to use a for loop in my expect cmdFile that I am calling.
I want to be able to call either one file name or a series of file names in the working directory (that I won't know the names before hand) and then pass the names to the sftp program.
Something like for i in (ls *txt)
do (0 Replies)
Discussion started by: vedder191
0 Replies
5. Shell Programming and Scripting
How to automate sftp with out using expect script?
My batch file has the password but it is not taking. Please see below.
I want to use this sftp connection in a loop for pushing new files in a directory one at a time. Hence I can not use an expect script.
bash-2.05$... (5 Replies)
Discussion started by: Tuxidow
5 Replies
6. Shell Programming and Scripting
hello All,
I am doing SFTP using expect. We just change our server from sun solaris 8 to sun solaris 10.
The script was working good on sun solaris 8.
But it is giving problem on 10. from shell, SFTP is working fine.Please help me.
What can be the problem.
LIB_sftp_get()
{
... (0 Replies)
Discussion started by: mindtee_abhi
0 Replies
7. Solaris
Hi Experts,
I am learning expect and wrote the below script for automatic sftp into a server:
#!/usr/local/bin/expect -f -d
spawn sftp -v test@mumux503 # logs into mumux503 as test user
expect "password:"
sleep 20
send "test\r"; # sending the password for test... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies
8. Shell Programming and Scripting
Hi All,
Here is my Expect script, I don't get any error message when I run it. But the file never goes to other system? I also paste the output screen below.
When I run the script, the script runs so fast. But when I do it manually, it takes about 10 minutes for the file to transfer.
... (1 Reply)
Discussion started by: samnyc
1 Replies
9. Shell Programming and Scripting
Hi all, i got a really strange problem
i wrote a script, when i run this script manually everything works fine
but when i make a cronjob for it, with the same user, the EXPECT script will not work.
Only the first line will be executed
this is the SHell bash script
#!/bin/sh;
php -q... (2 Replies)
Discussion started by: digitac
2 Replies
10. Shell Programming and Scripting
Hello all,
I've written an automated SFTP script to work with the Expect command. It recently occurred to me however, that if the client side box does not have the known host entry for the server, it will not work correctly. So I have added an expect for the known host prompt, and that part... (2 Replies)
Discussion started by: sysera
2 Replies