[techtalk] problem with scp

Malcolm Tredinnick malcolm at commsecure.com.au
Tue Nov 28 12:45:31 EST 2000


On Mon, Nov 27, 2000 at 03:52:37PM -0800, gabrielle wrote:
> I inherited a couple of linux boxes from other people in my group.
> Both are running Redhat, but I don't know what versions.  Probably
> old, as they were built more than a year ago.  Is there a way to find
> out which version of Redhat?  I only know 'uname', which shows the
> kernel, right?

You can find out the Red Hat distribution that was used to install the
box by doing

	cat /etc/redhat-release

With the kernel numbers you quote below, they look like a 5.x
distribution.

> linuxbox1:  built by a true wizard who is unfortunately no longer with the 
> company. kernel 2.0.34
> 
> linuxbox2:  built by a very nice guy who doesn't write things down and 
> won't remember what he did 10 minutes after he did it. :) kernel 2.0.36

For future use: in both cases, it will be very helpful if the people who
installed the box stuck completely to using rpms to install packages
(i.e. didn't just compile random things from tarballs and install them
in system directories). Then you can find out all the packages on the
system by doing things like

	rpm -qa

if you get curious in the future.

> They are both webservers, and part of my job is to keep them updated with 
> current documents.  I do not have ftp enabled on either of the boxes (and 
> am not permitted to), and have been using an ftp server as an intermediary, 
> but it is going to go away soon.  I have been trying to use scp, but it 
> works only to linuxbox1 (SSH Version 1.3.5) and not linuxbox2 (SSH Version 
> OpenSSH-2.1)! >:|

Be aware that the license for ssh1 was retrospectively this year to be
similar to that of ssh2. In other words, commercial use will typically
require money to change hands. That is one reason why people are using
OpenSSH more and more.

> Logged in to (yet another) box as root, when I try to scp a file to box 2,
> I get this error:
> :::-->scp testfile user at linuxbox2:/home/user/testfile
> user at linuxbox2's password:
> bash: scp: command not found
> lost connection
> 
> If I try to scp it as root, I get:
> :::-->scp testfile root at linuxbox2:/home/user/testfile
> root at linuxbox2's password:
> Permission denied.
> lost connection
> 
> The 'command not found' thing looks like a path problem with the box
> I'm scping from, but that doesn't really make sense because I'm root
> in both cases.

The "command not found" could be a result of something strange on the
remote machine as well. When you run scp, it needs to be able to find
scp on the remote machine as well. I've seen this once before when
someboyd installed ssh and friends in a completely bizarre location on a
remote machine. Unfortunately, I can't remember which program was the
problem, but a good start would be to make sure they are in a directory
in root's path on the remote machine.

The "permission denied" is for another reason. Just as many machines
disable root access via telnet, it is possible to not permit root to
login via ssh. If you really want to login as root, look in
/etc/ssh/sshd_config and put a line in that reads

	PermitRootLogin    yes

> Someone in my office who knows a little unix suggested that it's
> something with the version 2 SSH. 

Hard to comment about this because you haven't mentioned what client
you're using to try and connect to these boxes. OpenSSH can talk both
version 1 and 2 of the protocol. The only time you will get a protocol
mismatch is if you are using, say, ssh1 to connect to an ssh2 server.

Hope this helps,
Malcolm

-- 
Malcolm Tredinnick            email: malcolm at commsecure.com.au
CommSecure Pty Ltd:x

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://linuxchix.org/pipermail/techtalk/attachments/20001128/251e7ed7/attachment.pgp


More information about the Techtalk mailing list