scp -Bpq in Shell Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scp -Bpq in Shell Script
# 1  
Old 07-13-2009
scp -Bpq in Shell Script

Hi,
I have following statement in my script

scp -Bpq /u01/gro_backup_lisle/dump/weblogic.dmp host2:/oradata/dump/

and i get the following error

(publickey,password).
lost connection

Please advice
# 2  
Old 07-13-2009
You are losing the internet connection between you and host2. Is this occuring immediately after executing the scp command or some time later while you are trasferring a large file?
# 3  
Old 07-13-2009
Hi fpmurphy,
Immediately after the scp command.
Thanks

---------- Post updated at 09:49 AM ---------- Previous update was at 09:46 AM ----------

Hi fpmurphy,
I dont think there is connectivity breakdown between two hosts, because i when run the following it connects, see below

[oracle@host01:/u01/dump]$ scp weblogic.dmp oracle@host2:/oradata/dump
oracle@host2's password:
weblogic.dmp 54% |*************** | 5088 KB 00:47 ETA

The problem is when the scp command run in the shell script
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automated scp using shell & expect

Hi All, I have written a script to automate scp of files. Most of the times it works fine except few cases. I want your help and suggestions to fix these failures. I have used expect & shell to do the automated scp. Below is code $ cat scp.ksh #!/bin/ksh inputfile=$1 fdest_sid=$2... (8 Replies)
Discussion started by: veeresh_15
8 Replies

2. Shell Programming and Scripting

Script using scp

Hello, I am an student trying to make his final project and I wanna make a script to transfer a file using scp. The problem is that I need that executes when the computer starts (before session login), Ive tried this, if I execute it when im logged in it works, but not when the computer starts: ... (9 Replies)
Discussion started by: ohmigod
9 Replies

3. Shell Programming and Scripting

SFTP or scp with password in a batch script without using SSH keys and expect script

Dear All, I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies

4. Shell Programming and Scripting

scp using script

Hi all, I want to setup scp script for copying files to remote server. I did google and all refereed expect, but the script failed to work. Please lead me to some useful link or piece of script. Thanks in advance, (8 Replies)
Discussion started by: nrjrasaxena
8 Replies

5. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

6. Linux

Need SCP script equivalent to FTP script .

Hi, Currently i'm using the folllowing FTP acript and its working. echo "open $server" > ftp_file echo "user $user $password" >> ftp_file echo "cd $remote_dir" >> ftp_file echo "lcd $local_dir" >> ftp_file echo "put $file">> ftp_file echo "bye" >> ftp_file ftp -nv < ftp_file I've... (1 Reply)
Discussion started by: vickramshetty
1 Replies

7. Shell Programming and Scripting

how to direct scp output to a file in bash shell or script

I can run this from the command line: scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send and I get: file_to_send 100% |***************************************************************************| 0 00:00 but if I do: scp -i identfile... (6 Replies)
Discussion started by: NewSolarisAdmin
6 Replies

8. Shell Programming and Scripting

scp shell scripting question

HI all, I am attempting to use the scp statemet in a shell script that I am writing I need to have the user of the script enter a password at the time of the shell script running.I have the following questions? 1) how do i disable the automatic text echo when the user is entering the... (1 Reply)
Discussion started by: Segwar
1 Replies

9. Shell Programming and Scripting

scp and ssh thu shell script

Hi, I have a requirement of using the commands 'scp' and 'ssh' for remote shell operations.The commands are working fine from the command line.But my idea is to use it in a shell script and execute it. Can anyone suggest how this can be implemented uninteractively? Your help is... (1 Reply)
Discussion started by: DILEEP410
1 Replies

10. Shell Programming and Scripting

Simulating - unix login + scp via shell scripts

Hi, I am a new guy in this forum, I am trying to do the following stuff and want some inputs I am doing this manually, by using the scp command to copy file from a remote unix machine and entering the password at the password prompt. Like this, scp -p user@machine.com:/tmp/test.sh .... (1 Reply)
Discussion started by: drivewedge
1 Replies
Login or Register to Ask a Question