Error using SCP command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error using SCP command
# 1  
Old 11-06-2009
Error using SCP command

Hi -
I've a UNIX script which contains a scp command to copy a file to another server: scp <source path> <destination server:/path>
(scp dir1/file1.dat server2:/dir1/subdir1)

The job which is running this script is getting failed with error message "Remote copy Failed - Error Code: 7". When I'm checking the destination server I'm finding the whole file is successfully copied. I also checked manual page of scp and saw error code:7 means permission issue.

I'm still not been able to find out what's the reason of this message! Not sure where this "permission issue" lies!

Please help me to proceed further with this.

Regards,
Sandy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

scp Command

I need a scp command that will connect remote server and find current date & last three days log files and bring them to local machine..Remote server is AIX and local machine is RHEL 6.3. I write below but its not working scp / @IP:/logs/ '{find . -mtime -2 -name "*.LOG"}' (5 Replies)
Discussion started by: micle
5 Replies

2. Shell Programming and Scripting

scp command

Hi, Is there any way by which scp shall not prompt for a password? When ever i fire scp command it should automatically move the files to the mentioned location without prompting for the password. Is it possible?:confused: (2 Replies)
Discussion started by: arijitsaha
2 Replies

3. UNIX for Dummies Questions & Answers

help with scp command

Can someone please help me with what is wrong with this command? scp oracle@hrkpd124:/u01/app/oracle/rdbms/admin/dpoo.html root@hrkpmgmt:/export my intention is to copy the file dopp.html from the server hrkpd124 to the server hrkpmgmt but i am getting the error... (3 Replies)
Discussion started by: dollypee
3 Replies

4. Shell Programming and Scripting

Need help in using scp command

Hi all, I want to copy files from unix server to another unix server with out any password. Can some one please explain me the steps involved in achieving this with the actual commands and the sequence of commands i details. I tried my luck ith below procedure but it was not working. #... (1 Reply)
Discussion started by: p2winzip
1 Replies

5. UNIX Desktop Questions & Answers

scp command

if i use scp command to copy a file from one server another server it is asking password of the server from where the file being copied. i am automating some reports.. i need the file to be copied without asking the password. can any help me out??? thanks in advance, Arun Manas (1 Reply)
Discussion started by: arunmanas
1 Replies

6. UNIX for Dummies Questions & Answers

Ftp/scp Command Error

Hi, How to use ftp/scp command with password containing @ symbol. Ex: ftp xyz:xyz@sun@11.211.111.11:/export/backups/ Exception I got: unknown host or invalid literal address Note: I dont want to change the password. Regards, Vinodh' Kumar (5 Replies)
Discussion started by: vino_hymi
5 Replies

7. Shell Programming and Scripting

Help with SCP command

Hi, I have around 100 files which are aroun 10 MB in size and need to SCP all those files to another machine. Could you please suggest which way is efficient to do? 1. Gzip each file and transfer one by one. 2. Tar all the files together and then gzip it and send one HUGE file. Basicaly... (3 Replies)
Discussion started by: robinbannis
3 Replies

8. UNIX for Dummies Questions & Answers

scp command

I want to know how can i use scp command in the reverse fashion meaning i have two machines server1 and server2 I have files in server1 that i need to copy to server2 But i do not have write permissions on server2 although i have read permissions on server1 is there a way i can go... (3 Replies)
Discussion started by: bn_unx
3 Replies

9. UNIX for Dummies Questions & Answers

SCP command

Hello, Let's say I have the command line: scp -r /home/Mohit/Switches mkakkar@softmon:/home/mkakkar/ If I put a "/" after the Switches such that I get: scp -r /home/Mohit/Switches/ mkakkar@softmon:/home/mkakkar/ How does the behaviour change? (1 Reply)
Discussion started by: mojoman
1 Replies

10. UNIX for Dummies Questions & Answers

help on SCP command

Total unix newbie needs help:Need to SCP files to a WINDOWS NT server,but giving me some problems: REPOSITORY=/usr/psoft/fs600srv/reports/HR /usr/local/bin/scp -p -a $REPOSITORY/HR.glpccd*.unl Administrator@10.84.124.6:/Temp When I execute the script, it is giving me this error. ... (3 Replies)
Discussion started by: starla0316
3 Replies
Login or Register to Ask a Question
SCP(1)							    BSD General Commands Manual 						    SCP(1)

NAME
scp -- secure copy (remote file copy program) SYNOPSIS
scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same secu- rity as ssh(1). scp will ask for passwords or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ':' as host specifiers. Copies between two remote hosts are also permitted. The options are as follows: -3 Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts. Note that this option disables the progress meter. -4 Forces scp to use IPv4 addresses only. -6 Forces scp to use IPv6 addresses only. -B Selects batch mode (prevents asking for passwords or passphrases). -C Compression enable. Passes the -C flag to ssh(1) to enable compression. -c cipher Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh(1). -F ssh_config Specifies an alternative per-user configuration file for ssh. This option is directly passed to ssh(1). -i identity_file Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1). -l limit Limits the used bandwidth, specified in Kbit/s. -o ssh_option Can be used to pass options to ssh in the format used in ssh_config(5). This is useful for specifying options for which there is no separate scp command-line flag. For full details of the options listed below, and their possible values, see ssh_config(5). AddressFamily BatchMode BindAddress CanonicalDomains CanonicalizeFallbackLocal CanonicalizeHostname CanonicalizeMaxDots CanonicalizePermittedCNAMEs CertificateFile ChallengeResponseAuthentication CheckHostIP Ciphers Compression ConnectionAttempts ConnectTimeout ControlMaster ControlPath ControlPersist GlobalKnownHostsFile GSSAPIAuthentication GSSAPIDelegateCredentials HashKnownHosts Host HostbasedAuthentication HostbasedKeyTypes HostKeyAlgorithms HostKeyAlias HostName IdentitiesOnly IdentityAgent IdentityFile IPQoS KbdInteractiveAuthentication KbdInteractiveDevices KexAlgorithms LogLevel MACs NoHostAuthenticationForLocalhost NumberOfPasswordPrompts PasswordAuthentication PKCS11Provider Port PreferredAuthentications ProxyCommand ProxyJump PubkeyAcceptedKeyTypes PubkeyAuthentication RekeyLimit SendEnv ServerAliveInterval ServerAliveCountMax StrictHostKeyChecking TCPKeepAlive UpdateHostKeys UsePrivilegedPort User UserKnownHostsFile VerifyHostKeyDNS -P port Specifies the port to connect to on the remote host. Note that this option is written with a capital 'P', because -p is already reserved for preserving the times and modes of the file. -p Preserves modification times, access times, and modes from the original file. -q Quiet mode: disables the progress meter as well as warning and diagnostic messages from ssh(1). -r Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal. -S program Name of program to use for the encrypted connection. The program must understand ssh(1) options. -v Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems. EXIT STATUS
The scp utility exits 0 on success, and >0 if an error occurs. SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
scp is based on the rcp program in BSD source code from the Regents of the University of California. AUTHORS
Timo Rinne <tri@iki.fi> Tatu Ylonen <ylo@cs.hut.fi> BSD
May 3, 2017 BSD