I have a renesas v3h ARM v8 processor on an embedded platform. The yocto Linux on it doesnt have support for sshd so I was trying to install the binary in the rootfs. I downloaded the binary from here and copied it in the rootfs. When I try to run it, I get this error

root@v3h:/usr/bin# sshd
-sh: /usr/bin/sshd: cannot execute binary file: Exec format error

To be sure that the binary is infact for an arm64, I did this -

readelf -h sshd

and the output is this -

ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           AArch64

Here are the permissions for ssh and sshd. ssh btw works fine.

lrwxrwxrwx    1 1000     1000            23 Jan 28 11:27 ssh -> /usr/sbin/dropbearmulti
-rwxrwxr-x    1 1000     1000       2734032 Apr  2  2019 sshd

How do I resolve this?


kernel information-

root@v3h:/usr/bin# uname -a
Linux v3h-p708 4.9.0-yocto-standard #7 SMP PREEMPT Mon Jan 28 13:14:31 MSK 2019 aarch64 GNU/Linux

migrated from askubuntu.com Apr 3 at 16:17

This question came from our site for Ubuntu users and developers.

  • What is the readelf output for some other binary that does work on your system? – Kusalananda Apr 3 at 16:25
  • What's the output of file /usr/bin/sshd and ldd /usr/bin/sshd? I suspect something's wrong with the loader (see unix.stackexchange.com/questions/11000/… for explanations), although I don't know why this would result in ENOEXEC rather than ENOENT. Taking a binary from another distribution doesn't always work, if they use different libc or configure it differently. Try sshd from Yocto or OpenEmbedded. – Gilles Apr 3 at 16:46
  • Everythig is the same except the type: readelf -h candump Type: EXEC (Executable file) – o4385630 Apr 3 at 16:54
  • file: command not found ldd /usr/bin/sshd not a dynamic executable – o4385630 Apr 3 at 16:55
  • And, even with your processor being an v3h Arm v8, what is the version of the Kernel you are using? Could you please provide the results of uname -a at the question? You will not be able to run a v8 binary if you are using a generic 32bits Arm Kernel... – user34720 Apr 3 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.