Reg: SCP issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reg: SCP issue
# 1  
Old 11-19-2007
Reg: SCP issue

Hi ,

I am beginner in aix...

i am using the following command in my shell script to to copy the files from a secured server to my aix box...

/usr/local/bin/scp pickme@brad.wanted.com:../internal/mem_grp_details*

Should i use sleep command in my shell script for the script to copy the entire file....I found in some threads that sleep is not required...but for me the entire file is not copied without sleep...

Thanks is advance
sam
# 2  
Old 11-19-2007
Whats the issue exactly?

Do you mean, only a part of your file is being copied to your system???

Also the Syntax of the command should be

/usr/local/bin/scp pickme@brad.wanted.com:../internal/mem_grp_details* .

Thanks
~Sage
# 3  
Old 11-19-2007
Hi ,
Thanks for the response...

I am using the extact syntax u specified...
But only a part of my file is copied from the secured server to my AIX box without sleep command..

Thanks,
Sam
# 4  
Old 11-19-2007
If it really takes a very long time, chances are the ssh session will time out - try increasing the ssh timeout period on the server, if possible.

~Sage
# 5  
Old 11-19-2007
Hi ,

are u aware of the default time out period for scp and ssh session



Thanks ,
Sam
# 6  
Old 11-19-2007
Not sure about AIX, but in most of the systems it is placed here

/etc/ssh/sshd_config

and with an entry called

ClientAliveInterval 300

Uncomment that line and it should be fine after restarting ssh

~Sage
# 7  
Old 11-19-2007
Sage,

i dont have permission to edit the file....
So i thought of providing the sleep command to run the process.
but for me the size of the files will vary each time...i think i should first find the size of each file and use an if-else to find the sleep to be provided...

any comments...Smilie

thanks,
sam
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't solve a simple SSH/scp issue.. Please help.

Disclaimer: I tried searching but wasn't able to get to the answer so please don't flame. Scenario: I have a root script that generates a file on box1 and then needs to scp it over to box2 using user1. Both boxes are running open-ssh. root@locat-host# scp /tmp/file1 user1@box2:/tmp/file1 ... (10 Replies)
Discussion started by: denissi
10 Replies

2. Shell Programming and Scripting

Issue with scp to whole folder

previously 1 folder was created in a week. but now it creating more than 1 folder. shown as belowfor example:-------------------- 1 Aug A 2 Aug B 8 Aug M. Now i want scp to the whole content for whole folder. Let say in first week having 2 folder which need to scp to remaote in twice... (1 Reply)
Discussion started by: rabindratech
1 Replies

3. Shell Programming and Scripting

scp/untar .tar file in parallel issue

Hi Guys, I am facing a strange issue while doing parallel (using & for background) scp/untar operation from my unix box to multiple unix boxes... I am getting tar : unexpected EOF in archive error the code is as follows.,,, for i in 10 do sh -c "scp <command> ; ssh tar -xf <tar> -C... (4 Replies)
Discussion started by: mihirvora16
4 Replies

4. UNIX for Advanced & Expert Users

scp/untar in parallel issue tar : Unexpected EOF in archive

Hi Guys, I am facing a strange issue while doing parallel (using & for background) scp/untar operation from my unix box to multiple unix boxes... I am getting tar : unexpected EOF in archive error the code is as follows.,,, for i in 10 do sh -c "scp <command> ; ssh tar -xf <tar> -C... (1 Reply)
Discussion started by: mihirvora16
1 Replies

5. Solaris

scp issue

Hi I am trying to copy file from one server to another server. i used : scp filename username\@targerserver:path i got this is error : ssh: servername: node name or service name not known lost connection Please advice on this Thanks, Mani (1 Reply)
Discussion started by: Mani_apr08
1 Replies

6. UNIX for Dummies Questions & Answers

scp issue

I've got an ssh server on each pc in my LAN. I wanna use scp to copy files, but it doesn't work. 0;4:59pm% scp mghis@localhost:/home/mghis/foobar mghis@192.168.0.3:/home/mghis/foobar mghis@192.168.0.3's password: < I type in the remote password > mar 28 set 2010, 17.00.26, CEST 17:00:26 up... (4 Replies)
Discussion started by: mghis
4 Replies

7. UNIX for Dummies Questions & Answers

scp issue

hi, after scp from a mac to a unix server and back a set of .wav files (originally generated by ppt with 'record narration') become corrupted somehow, and when opened the sound files has become noise. non-.wav files in the same folder are not affected. strangely, the problem only seems to... (0 Replies)
Discussion started by: halcroves
0 Replies

8. UNIX for Dummies Questions & Answers

doubt reg SCP

Hi , I have a doubt reg SCP . For eg.. FileA is in host1 .Is it possible to receive fileA by logging to host2 using SCP.. Please let me know what is the major difference between scp and sftp.. We can use both for file transfer(correct me if am wrong) (4 Replies)
Discussion started by: rogerben
4 Replies

9. Shell Programming and Scripting

Reg : telnet password issue

Hi All, I am working on AIX 5.3. My requirement is to telnet to a server and scp a file from another server In my shell script i am using telnet to enter to a server and i am echoing the password as below echo open $Infahost sleep 1 echo $Infaftplogin sleep 1 echo $Infaftppasswd... (3 Replies)
Discussion started by: sam99
3 Replies

10. SCO

reg:rm -R is not working

I am installing the my package in SCO unix 5.0 .so it will create some temporary directories and files and same will delete.So , 'rm -R ' is not working in system .in the package only it has given this command,so now without this command working we can not go forward. so kindly help in this... (1 Reply)
Discussion started by: mokri_1980
1 Replies
Login or Register to Ask a Question