LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-30-2016, 03:57 PM   #1
xiongnu
Member
 
Registered: Sep 2004
Distribution: Devuan, Void
Posts: 264

Rep: Reputation: 23
'sh: scp: not found' error


hi, i'm trying to transfer file from my embedded linux system to window7 machine through 'scp'.

I installed 'putty.exe' and 'pscp.exe' on windows machine and have 'sshd' server running on embedded system with busybox installed.

when i run:
pscp -P myport# root@www.myserver.com:\mnt\usb\Usb_Disk_1\music\t2.mp3 .
root@www.myserver.com's password:
sh: scp: not found

my scp is located in '/program/openssh/bin' and i've added to the path:

/etc # export PATH=$PATH:/program/openssh/bin
/etc # echo "$PATH"
/usr/bin:/bin:/usr/sbin:/sbin:/home/work/sshd/bin:/home/bin:/home/program:/home/bin/openssh/bin:/program/openssh/bin

how to fix this?

Last edited by xiongnu; 09-30-2016 at 03:59 PM.
 
Old 09-30-2016, 04:18 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It says "not found", not "command not found"
I think scp doesn't find the file, did you check the file path?
Maybe test with another file
 
Old 09-30-2016, 05:32 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Are you running that command on linux or windows. If your embedded device is sftp capable you can use filezilla or winzip GUI applications.

If running that command from windows then use the full path to pscp or add it to the path environment.

pscp.exe is a scp client and not a server.
 
Old 10-01-2016, 03:57 AM   #4
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
sh: scp: not found
This error message means that the shell cannot execute the specified command (e.g. scp).
The file "not found" is typically the dynamic linker/loader or a shared library required by the executable.
This error message typically occurs when a (foreign) executable is installed in a rootfs that uses a different version of shared libraries (e.g. the executable was compiled for glibc, but the (embedded) rootfs has uClibc).

If you have strace already installed, then the command `strace scp` should reveal the missing file.
Otherwise use `strings scp | less` to view the names of the shared libraries used by scp. Compare the extracted library names to what's in /lib.

Regards
 
Old 10-03-2016, 09:59 AM   #5
xiongnu
Member
 
Registered: Sep 2004
Distribution: Devuan, Void
Posts: 264

Original Poster
Rep: Reputation: 23
it turned out that 'scp' wasn't in the executable path(/usr/bin:/bin:/usr/sbin:/sbin). it's located in '/program/openssh/bin' folder and i couldn't add it to path by issuing 'export PATH=$PATH:/program/openssh/bin' because '/etc/profile' is read only on the embedded system.

after i copied 'scp' to /bin folder, transferring file went smoothly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash: scp: command not found mahao_boy Linux - Newbie 8 03-30-2015 01:41 PM
scp: command not found - (Not Installed ???) stuartornum Linux - Software 8 04-01-2014 09:01 AM
Centos 6.3 host+guest: try scp to guest: scp cmd not found. ssh ok chrism01 Linux - Virtualization and Cloud 3 08-24-2012 01:52 AM
bash: scp: command not found \ lost connection maccas17 Linux - Server 4 06-04-2012 03:47 AM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 06:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration