Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
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.


  Search this Thread
Old 09-30-2016, 04:57 PM   #1
Registered: Sep 2004
Distribution: Devuan, Void
Posts: 260

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#\mnt\usb\Usb_Disk_1\music\t2.mp3 .'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"

how to fix this?

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

Rep: Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870Reputation: 870
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, 06:32 PM   #3
Registered: Aug 2002
Posts: 24,972

Rep: Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677Reputation: 5677
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, 04:57 AM   #4
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
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.

Old 10-03-2016, 10:59 AM   #5
Registered: Sep 2004
Distribution: Devuan, Void
Posts: 260

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:41 PM
scp: command not found - (Not Installed ???) stuartornum Linux - Software 8 04-01-2014 10: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 02:52 AM
bash: scp: command not found \ lost connection maccas17 Linux - Server 4 06-04-2012 04:47 AM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-29-2008 12:41 AM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:44 AM.

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