I have installed OpenSSH 7.5p1 on my Raspberry Pi from Debian. I installed it using wget, the tar -zxvf openssh_7.5p1.orig.ta.gz, cd openssh_7.5p1, ./configure, make, sudo make install.

When I do my security scan it says 6.7p1. Command output for:

ssh -V
OpenSSH_7.5p1, OpenSSL 1.0.15t 3 May 2016


/usr/bin/ssh -V
OpenSSH_6.7p1, Raspbian-5+deb8u3, OpenSSL 1.0.15t 3 May 2016

When I do sudo dpkg --list openssh* it shows it using 6.7p1.

I deleted /usr/bin/ssh and linked it to /usr/local/bin/ssh. And now it shows:

OpenSSH_7.5p1, OpenSSL 1.0.15t 3 May 2016

But the sudo dpkg --list openssh* still shows 6.7p1. I need it to scan and see only the 7.5p1.

Running whereis ssh gives ssh: /usr/bin/ssh /etc/ssh /usr/local/bin/ssh /usr/share/man/man1/ssh.1.vs and which ssh shows /usr/local/bin/ssh

Ok I used apt-get purge to purge all instances of ssh, and reinstalled 7.5p1 as before. 7.5 is still in my /usr/local/bin. I linked /usr/bin/ssh to /usr/local/bin/ssh again. Now when I run sudo dpkg --list openssh* it show no instance of ssh, and I can't start the ssh service.

Is there anyway to fix this issue?

  • Show output of whereis ssh, which ssh
    – mrc02_kr
    Aug 31, 2017 at 19:19
  • Whereis ssh shows ssh: /usr/bin/ssh /etc/ssh /usr/local/bin/ssh /usr/share/man/man1/ssh.1.vs and which ssh shows /usr/local/bin/ssh Aug 31, 2017 at 19:21
  • Is your security scan looking at network ports (ie the server)? You've only told us about the ssh client. Aug 31, 2017 at 19:56
  • Its looking at port. Am really talking about both. Aug 31, 2017 at 19:58
  • 2
    Why are you installing a different version? You should keep the one from the distribution. Installing your own is a security risk unless you diligently apply security updates. Aug 31, 2017 at 22:18

1 Answer 1



I would suggest removing the old instances and installing a fresh, latest version using this official Repo

  • I used that install the 7.5 I have but the system didn't replace the 6.7 and its still running Aug 31, 2017 at 19:25
  • have you removed the old version from the system beforehand?
    – Bumba laga
    Aug 31, 2017 at 19:25
  • I did, but then nothing ran Aug 31, 2017 at 19:26
  • Looks like the user has two versions of ssh installed, one by package manager and another in /usr/local. Also only ssh mentioned, not sshd.
    – sebasth
    Aug 31, 2017 at 19:26
  • try to use "apt-get purge ssh*" and then check if any instance of ssh is still installed if not, install the latest version from the repo i have linked above. BEWARE, that after the purge you will have no ssh installed, therefore DO NOT close your ssh connection until you make sure, that you can connect to it in a new shell
    – Bumba laga
    Aug 31, 2017 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .