Two ssh client binaries (/bin/ssh, /usr/bin/ssh)

General support questions
Post Reply
zeek
Posts: 1
Joined: 2017/05/22 22:54:38

Two ssh client binaries (/bin/ssh, /usr/bin/ssh)

Post by zeek » 2017/05/22 23:01:29

Can anyone tell me why there are two ssh client binaries included in package openssh-clients (/bin/ssh, /usr/bin/ssh)? I realize one may simply be a hard link to the other (and I'm looking for the RPM specfile to see if/where this is done). And I suspect the reason may be something like "to find it in regardless of $PATH"

I searched around for a definitive reason, or others asking the same, and didn't come up with anything...


Code: Select all

Name        : openssh-clients
Version     : 6.6.1p1
Release     : 35.el7_3
Architecture: x86_64
Install Date: Tue 09 May 2017 01:52:06 PM PDT
Group       : Applications/Internet
Size        : 2299340
License     : BSD
Signature   : RSA/SHA256, Wed 12 Apr 2017 06:31:18 PM PDT, Key ID 24c6a8a7f4a80eb5
Source RPM  : openssh-6.6.1p1-35.el7_3.src.rpm
Build Date  : Wed 12 Apr 2017 07:05:51 AM PDT
Build Host  : c1bm.rdu2.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.openssh.com/portable.html
Summary     : An open source SSH client applications
Description :
OpenSSH is a free version of SSH (Secure SHell), a program for logging
into and executing commands on a remote machine. This package includes
the clients necessary to make encrypted connections to SSH servers.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Two ssh client binaries (/bin/ssh, /usr/bin/ssh)

Post by avij » 2017/05/23 00:08:19

Code: Select all

$ ls -ld /bin
lrwxrwxrwx. 1 root root 7 Nov 20  2016 /bin -> usr/bin
The /bin directory is a symlink to /usr/bin, so this is not specific to ssh.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Two ssh client binaries (/bin/ssh, /usr/bin/ssh)

Post by TrevorH » 2017/05/23 08:23:57

If you run rpm -ql openssh-clients you can see that it only provides /usr/bin/ssh. The /bin symlink is owned separately by the filesystem package and that sets up a symlink for /bin to /usr/bin (and /lib, /lib64 and /sbin all as symlinks too as part of the "usrmove" project).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

unix_commando
Posts: 7
Joined: 2015/01/06 14:16:27

Re: Two ssh client binaries (/bin/ssh, /usr/bin/ssh)

Post by unix_commando » 2017/05/24 18:56:10

You're dealing with legacy Unix things here. In the old days system binaries were kept in /bin or /sbin and user binaries were kept in /usr/bin and /usr/sbin. For backward compatibility the structure has been kept.

-Bob

Post Reply