cancel
Showing results for 
Search instead for 
Did you mean: 

unable to scp

NDO
Super Advisor

unable to scp

Hi

I am facinf difficulties copy files and folder from sever A running hp-ux 11.23 to server b also running 11.23, when trying to use "scp" command:

scp EnvironmentVariable.txt root@10.1.20.22:/backup01/mceldev/
sh: scp:  not found.

but when running "whereis" command:

whereis scp
scp: /usr/bin/scp

Please can you give a hint on what could  be the problem

6 REPLIES
Bill Hassell
Honored Contributor

Re: unable to scp

The whereis command is only slightly useful. The command you need to use is:

type scp
scp is /usr/bin/scp

The type command explains what the shell will do when you use the word scp.

If you get /usr/bin/scp, then check the file itself:

ll /usr/bin/scp
and
file /usr/bin/scp



 

 



Bill Hassell, sysadmin
NDO
Super Advisor

Re: unable to scp

Hi

thanks for the reply, but:

type scp
scp not found.

and , I had a crash a week ago after a "shutdown -ry 0" in which /opt, /var, disappear. That could explain right?

ll /usr/bin/scp
lrwxr-xr-x   1 root       sys             16 Apr 26  2006 /usr/bin/scp -> /opt/ssh/bin/scp
Bill Hassell
Honored Contributor

Re: unable to scp

.../opt, /var, disappear...

Yes, that explains the scp issue. However, since /opt and /var are critically important, this system probably has a lot more problems than scp. You may have a failed disk and you'll need to replace it and restore the system from your Ignite backup (if the disk is not mirrored).



Bill Hassell, sysadmin
NDO
Super Advisor

Re: unable to scp

a decison has been made to rebuild from scratch, because its an old test server, tape drive dat72 not working, so I was just trying to copy some data, I managed to do that with ftp, but unfortunately could not preserve time stamps

Dennis Handly
Acclaimed Contributor

Re: unable to scp

>I managed to do that with ftp, but unfortunately could not preserve time stamps

 
You could have used tar and then copied that tarball and then you could keep the timestamps, owners and permissions.
NDO
Super Advisor

Re: unable to scp

Hi

Thanks for the advise, I am now doing that