scp error while trying to copy files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers scp error while trying to copy files
# 1  
Old 10-25-2013
scp error while trying to copy files

Hi,

I am trying to copy files from one server to other using the below code.
Code:
scp -B -p user@remoteserver:/tmp/abc.txt  /landing/files

The above command is failing with error
You're not allowed to run 'scp -p -f /tmp/abc.txt '

When I am using scp -B -p , why am I getting error msg as scp -p -f

Please help!

Thanks.
# 2  
Old 10-25-2013
Quote:
Originally Posted by Nikhath
Hi,

I am trying to copy files from one server to other using the below code.
Code:
scp -B -p user@remoteserver:/tmp/abc.txt  /landing/files

The above command is failing with error
You're not allowed to run 'scp -p -f /tmp/abc.txt '

When I am using scp -B -p , why am I getting error msg as scp -p -f

Please help!

Thanks.



Try

For file
Code:
scp  user@remoteserver:/tmp/abc.txt /landing/files

for directory
Code:
scp -r user@remoteserver:/tmp /landing/files

when you specify P that is remote host using port number example :
syntax would be
Code:
scp -P 2264 .....................


Last edited by Akshay Hegde; 10-25-2013 at 07:42 AM..
# 3  
Old 10-25-2013
Though we keep repeating ourselves, knowing your OS version and shell does help to understand the behavoiur of ssh that can change depending implementaion...
your case looks like it is strict and will not copy keeping original ownership to destination directory ( write restriction conflict?)
Some OS would make you the new owner some will say nothing ( and do nothing!...) some...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can we overcome Broken pipe error during scp,SFTP,Rsync while transferring big files.?

Hello All, Hope all are doing well. We use scp (some times sftp and rsync also) for transferring big files (around 2GB each ) from 1 Network to another Network. The Issues which we face :- During transfer some times( Once in 1 week (or twice)) , the speed of transfer gets down to 30 kb/s,... (2 Replies)
Discussion started by: Upendra Bhushan
2 Replies

2. UNIX for Advanced & Expert Users

Secure Copy, scp

Is there a way we can avoid asking of password when we transfer file from one Unix server to another server using SCP command. Or Is is possible that the batch file in unix in which I am giving the SCP command takes the password and transfer the files automatically without me typing the... (1 Reply)
Discussion started by: Pash
1 Replies

3. UNIX for Dummies Questions & Answers

directory copy with scp

I need to copy all files and directories with scp, but seems I am missing something? /usr/bin/scp -p /custscripts/* rmprod2:/custscripts doesn't copy directories and files under them. Please advise. (1 Reply)
Discussion started by: Daniel Gate
1 Replies

4. Shell Programming and Scripting

Help with Secure Copy (SCP) command

Hi, I am in the process of converting ftp transfres to SCP in my scripts. Have some doubts with SCP command 1) currently script puts a list of ftp commands in afile and paasses the file to ftp as input echo "user abc pwd" >inputfile echo "ls *" >> inputfile echo "quit" >> inputfile... (5 Replies)
Discussion started by: justchill
5 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. UNIX for Dummies Questions & Answers

Unable to copy file using SCP (Input/output & Permission denied error)

Hi, I am facing issue while using scp. Source & target machines are Linux & HP-UX respectively. On target machine, if I fire the following command, I get error: Now if I try scp on another file, which is on the same source machine, it works fine. All directories and subdirectories... (2 Replies)
Discussion started by: Technext
2 Replies

7. Shell Programming and Scripting

copy files using scp without overwriting

Hi, i need to use "scp" to copy a file without overwriting the same in destinations. any suggestion? thanks Sivaji (3 Replies)
Discussion started by: sivarajb
3 Replies

8. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

9. Shell Programming and Scripting

SCP copy

I want to copy all the files and subdirectory from a server. I tried scp pritish@ipaddress:/home/pritish -r $PWD it copies all the files but not the directory, Can any one help me. I want to copy files as well as subdirectory from a server directory Note: Use CODE-tags when... (2 Replies)
Discussion started by: pritish.sas
2 Replies

10. Solaris

scp - copy between two remote machines?

1. scp person1@10.10.10.1:file1 person2@10.10.10.2:file1 2. scp file1 person1@10.10.10.1:file1 For #1, I keep getting this error: Password: Host key verification failed. lost connection I have entered the correct password too! #2 works fine. I suppose I cannot copy a file between two... (6 Replies)
Discussion started by: kungpow
6 Replies
Login or Register to Ask a Question