Published on: August 10, 2014 by Karthikeyan B.
Identification of source rpm of an installed binary is essential at some points especially during upgrades or conflicting libraries.
Let us check which rpm provides /usr/sbin/sshd
The source RPM can be identified using the following options
# rpm -q --whatprovides /usr/sbin/sshd openssh-server-5.3p1-94.el6.x86_64
Another Handy tool is
root@server [/]# rpm -qf /usr/sbin/sshd openssh-server-5.3p1-94.el6.x86_64
In Debian based systems there are two ways one is using apt-file & dpkg -S
This binary may not be available in all installation. Below are the steps to be used for the installation
apt-get install apt-file
Once this is done update the db using the following commands
The above check will give the result as given below
# apt-file search /usr/sbin/sshd openssh-server: /usr/sbin/sshd
Using dpkg -S
# dpkg -S /usr/sbin/sshd openssh-server: /usr/sbin/sshd
Category : Linux