1751935 Members
4829 Online
108783 Solutions
New Discussion юеВ

Re: scp copying problem

 
SOLVED
Go to solution
HP UNIX Professionals
Frequent Advisor

scp copying problem

Hi Exprts,

Please help me for to copying files form one sever to another HPUX box using scp.

When i try to scp, i am getting error "Permission denied, please try again." The file permission is 530, i changed the permission to 777, even i getting the same error. Plese give your fourable input to solve this issue.

Command:
=========
scp -p TDPO.tdp_dm3cys_prod 142.117.84.97:/tmp/tcb

File:
====
-rw-r--r-- 1 root sys 57 Jul 21 2005 TDPO.tdp_dm3cys_prod

Error:
====

"Permission denied, please try again


Thanks in advance,

VINAY
21 REPLIES 21
Matti_Kurkela
Honored Contributor
Solution

Re: scp copying problem

What are the permissions of the source and destination _directories_?

MK
MK
Tingli
Esteemed Contributor

Re: scp copying problem

What is the ownership and permission of /tmp/tcb in 142.117.84.97?
HP UNIX Professionals
Frequent Advisor

Re: scp copying problem

Sorce
=====
-rwxrwxrwx 1 root sys 57 Jul 21 2005 TDPO.tdp_dm3cys_prod <-----
-rw-r--r-- 1 root sys 811 Oct 17 2003 dsm.opt
-rw-r--r-- 1 root sys 236 Mar 15 2005 dsmerror.log
drwxrwxrwx 2 root sys 96 Jun 8 2004 logs
-r-xr-xr-x 1 root bin 735 Oct 21 2003 tdpo.opt
-rw-rw-rw- 1 ebutt ibmsys 135 Mar 15 2005 tdpoerror.log


Destination dir
===============

drwxrwxrwx 2 root sys 96 May 11 09:49 PROD
Tingli
Esteemed Contributor

Re: scp copying problem

Does file /tmp/tcb exist? If it is, then what is the ownership and mode of the file.

And if /tmp/tcb is a directory, then what is its ownership and mode?
atul2701
Frequent Advisor

Re: scp copying problem

Pls provide the output of ls -ld /tmp/tcb command on 142.117.84.97.

atul
Atul Gupta
Chandrahasa s
Valued Contributor

Re: scp copying problem

Hi,

While doing scp you need to mention username also

it should look like

scp -p TDPO.tdp_dm3cys_prod root@142.117.84.97
:/tmp/tcb

then it will ask do you want connect if your connecting first time type yes
then provide root password of 142.117.84.97

Chandra
irshad ali
Frequent Advisor

Re: scp copying problem

chanderdasa's command is correct. but it is limited to copy only files.
Is there any command to copy directories aslo

thanks
atul2701
Frequent Advisor

Re: scp copying problem

yes you can.

Use scp -r to copy a dir Recursively.

Atul
Atul Gupta
Aneesh Mohan
Honored Contributor

Re: scp copying problem

Hi,

>> but it is limited to copy only files.Is there any command to copy directories aslo

use "-r" option along with scp

>>"Permission denied, please try again

It seems like your PermitRootLogin is set to no in /opt/ssh/etc/sshd_config or ssh key is not working.

Aneesh