I asked:
> I'm having a very strange problem with the scp associated with ssh version
> 1.2.25 between a couple of Sun boxes running Solaris 2.5.1.
>
> There is some program that scp wants to execute that it cannot find.
> I'm including a verbose output of an scp attempt here. You'll see
> buried near the bottom the "scp: Command not found" line. The scp
> binary itself is definitely there, so this is an error being returned
> by scp, not the OS.
>
> I've read through the scp man page, even read the source file scp.c, but
> I don't see anywhere what file it may be that it wants to execute. A
> truss of the scp command showed that it was correctly locating the ssh
> binary and the scp binary, but there was no indication of what the file
> might be that it cannot find (I'm guessing that it is a child process
> that is doing the complaining). If anyone can provide me some hints
> to get scp to actually work, I'd be most appreciative. Thanks very much.
>
> (~) shalmaneser 171 % scp -v spam tsg-www:/var/tmp/spam
> Executing: host tsg-www, user (unspecified), command scp -v -t /var/tmp/spam
> SSH Version 1.2.25 [sparc-sun-solaris2.5.1], protocol version 1.5.
> Compiled with RSAREF.
> shalmaneser: ssh_connect: getuid 2149 geteuid 0 anon 0
> shalmaneser: Connecting to tsg-www [XXX.XXX.XXX.XXX] port 22.
> shalmaneser: Allocated local port 1001.
> shalmaneser: Connection established.
> shalmaneser: Remote protocol version 1.5, remote software version 1.2.25
> shalmaneser: Waiting for server public key.
> shalmaneser: Received server public key (768 bits) and host key (1024 bits).
> shalmaneser: Host 'tsg-www' is known and matches the host key.
> shalmaneser: Initializing random; seed file /home/cbar44/.ssh/random_seed
> shalmaneser: Encryption type: idea
> shalmaneser: Sent encrypted session key.
> shalmaneser: Installing crc compensation attack detector
> shalmaneser: Received encrypted confirmation.
> shalmaneser: Trying rhosts or /etc/hosts.equiv with RSA host authentication.
> shalmaneser: Remote: Accepted by .shosts.
> shalmaneser: Received RSA challenge for host key from server.
> shalmaneser: Sending response to host key RSA challenge.
> shalmaneser: Remote: Rhosts with RSA host authentication accepted.
> shalmaneser: Rhosts or /etc/hosts.equiv with RSA host authentication accepted by server.
> shalmaneser: Sending command: scp -v -t /var/tmp/spam
> shalmaneser: Entering interactive session.
> scp: Command not found
> shalmaneser: Transferred: stdin 0, stdout 23, stderr 0 bytes in 0.6 seconds
> shalmaneser: Bytes per second: stdin 0.0, stdout 37.2, stderr 0.0
> shalmaneser: Exit status 1
> lost connection
> (~) shalmaneser 172 %
The solution:
ugh. scp is a symmetric protocol. It has to run on both ends of the copy.
My scp binary was missing from the target host. Now that I know what it
is telling me, the "Sending command: scp -v -t filename" line above makes
much more sense.
Thanks to those who replied.
+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:53 CDT