1831408 Members
3179 Online
110025 Solutions
New Discussion

Re: ssh rcp problem

 
Tim Killinger
Regular Advisor

ssh rcp problem

any one have any ideas for me?

When i issue the following rcp:

$rcp file.dat TKillinger@icgnode.veriz.com:/tkillinger/tmp.tmp

I get:

TKillinger@icgnode.veriz.com's password:
/usr/bin/sh: No such file or directory
scp: warning: child process (/opt/ssh2/bin/ssh2) exited with code 0.

I have 3 other hosts configured with the same 11.11 installation that work fine.

Thanks in advance!!
10 REPLIES 10
Pedro Cirne
Esteemed Contributor

Re: ssh rcp problem

Hi,

Do you have the /tkillinger directory created on icgnode.veriz.com?

Enjoy :)

Pedro
Tim Killinger
Regular Advisor

Re: ssh rcp problem

yes, the destination directory exists.
Pedro Cirne
Esteemed Contributor

Re: ssh rcp problem

Hi,

Try to refer to file.dat with absolut path:

$rcp /path_to_file.dat/file.dat TKillinger@icgnode.veriz.com:/tkillinger/tmp.tmp

Enjoy :)

Pedro
RAC_1
Honored Contributor

Re: ssh rcp problem

remsh icgnode.veriz.com -l TKillinger 'who -um'

Does that work?? also user name is more than 8 chars.
There is no substitute to HARDWORK
Tim Killinger
Regular Advisor

Re: ssh rcp problem

Pedro, using the complete path, the error is the same.

RAC, the results to the remsh are :

remshd: Login incorrect.

And I've carfull verify that I'm using a valid username on that node.

I'm not acually using TKillinger - the names were changed to protect the innocent:)
RAC_1
Honored Contributor

Re: ssh rcp problem

Let's isolate the problem.

1. Plain telnet to other system.
2. Key in user_name and password.
3. Once logged on, do who -um

What is in the last coloumn of above command?? The same name/ip_address need to go in .rhosts file in home dir. something as follows.

source_host/ip_Address "user_name"

Is that the case with you??
There is no substitute to HARDWORK
Raj D.
Honored Contributor

Re: ssh rcp problem

Hi Tim ,

Check $HOME/.rhosts permission is set properly.

You can do the same through scp also , if SSH is installed and sshd is running, and ssh-keygen is set. That can be done without password , like rcp and better than rcp.
$ scp file.dat icgnode.veriz.com:/tkillinger/tmp.tmp

Cheers ,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Doug O'Leary
Honored Contributor

Re: ssh rcp problem

Hey;

I think there's a layer of misdirection here that previous posters may have glossed over. You issue an rcp command but get an error from scp. That tells me that someone has removed the original rcp and linked it to scp.

Just to prevent confusion, I'd suggest using scp directly.

Try issuing a couple of ssh commands to the remote system to verify ssh functionality:

ssh -l TKillinger icgnode.veriz.com ls -ld /tmp
ssh -l TKillinger icgnode.veriz.com ls -ld /tkillinger
ssh -l TKillinger icgnode.veriz.com ls -ld /tkillinger/tmp.tmp

If the first one errors out, you have an issue with your ssh connectivity that needs to be addressed before continuing.

If any of the second two fail, it means your target directory doesn't exist so you won't b e able to copy a file to it.

Assuming all three of those work, it's time to verify the host. You mentioned you have three other hosts on which this command works. Verify via nslookup that there are no discrepancies between the name resolution for icgnode.veriz.com between those three hosts and the one on which you're having problems.

If all that's correct, then try the scp command with a couple of -v-v options and post the results. Hopefully, that'll give you and/or us some more information to examine.

HTH;

Doug O'Leary


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Bob_Vance
Esteemed Contributor

Re: ssh rcp problem

Another thing that's curious to me is the error msg, itself:

/usr/bin/sh: No such file or directory


If the source file or destination file doesn't exist, I get this:

Pine3 ## scp setup bobv@pine3:/cxcxcc/t.t
Password:
scp: /cxcxcc/t.t: No such file or directory

or

Pine3 ## scp xsetup bobv@pine3:/cxcxcc/t.t
Password:
xsetup: No such file or directory


I would presume that it can't really be that '/usr/bin/sh' doesn't exist.


In fact, if user shell doesn't exist, I just keep getting password request:

Pine3 ## scp setup bobv@pine3:/cxcxcc/t.t
Password:
Password:
Password:


or, if it has perm problem:

Pine3 ## scp setup bobv@pine3:/cxcxcc/t.t
Password:
/usr/bin/shxx: Permission denied
lost connection


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Kevin Wright
Honored Contributor

Re: ssh rcp problem

is ssh/scp in the user's path and executable on the destination node? Recently had a similiar issue and it was due to scp not being executable on the remote node.