LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SCP problem ... Please help ! (https://www.linuxquestions.org/questions/linux-software-2/scp-problem-please-help-561611/)

khanrockz 06-13-2007 06:44 PM

SCP problem ... Please help !
 
Hi !
I am running into a problem that I have never experienced or seen before. As there are a lot of linux gurus here , this might be trivial to them ( or may be not ! :) ).
OK , so here it goes , I am using scp on two linux boxes. On one box ssh is not in the path or it is in the path but cant run. The error it gives is :

ukhan bin> ssh
ssh: error while loading shared libraries: libssh.so: cannot open shared object file: No such file or directory

So I presume it is broke. As it is broke it should not run (and it doesnt) but miraculously scp works !! Now I thought that scp internally calls ssh and if ssh is broke it wont run ... but it does !! Strace call shows me that scp executes this :

execve("/usr/bin/ssh", ["/usr/bin/ssh", "-x", "-oForwardAgent no", "-oClearAllForwardings yes", "-lroot", "192.168.0.4", "scp -t /root/scpexit"], [/* 34 vars */]) = 0

So I dont know how ? but it works.

Now on the other box , i have ssh installed and is in the path. But when I try to execute scp it gives me this error :

ukhan bin> scp test.txt root@192.168.0.4:/root/
command-line line 0: Missing yes/no argument

Again using the strace this time the call is :
execve("/usr/bin/ssh", ["/usr/bin/ssh", "-x", "-oForwardAgent no", "-oClearAllForwardings yes", "-lroot", "192.168.0.4", "scp -t /root/"], [/* 34 vars */]) = 0

Now the commands look similar but one breaks and the other doesnt ??? Also, if I run "ssh -x -oForwardAgent No root@192.168.0.4" ... it will give me the same error. So this means it is not even a valid ssh command. I have tried using "ssh -o ClearAllForwardings yes root@192.168.0.4". This would give me the same error.
I am confused ... if this is not even a valid ssh command then how is scp using it ? How is first box working and the scond one not ?
Any help is appreciated :).

Tinkster 06-13-2007 07:34 PM

And which version of ssh on which version of Linux is which of
those machines running?

As for the first odd case (ssh complaining about missing libs) ...
did you check perms on the libs and executables, does libssh.so
exist on your machine, is in the LD_LIBRARY_PATH (or /etc/ld.so.cache)?


Cheers,
Tink

khanrockz 06-14-2007 11:18 AM

I am running ssh v2.
About first problem. You were right. SSH was not running cause its path was not in LD_LIBRARY_PATH. I fixed it and it worked fine.
The second problem is still there giving me that "yes/no" error. Any scp guru out here ?


All times are GMT -5. The time now is 01:59 AM.