In some tutorials around the web to install OpenSSH exists the following commands:
sudo apt install openssh-server
sudo apt install openssh-client
For example for Ubuntu Desktop
is mandatory install the Openssh's Server - and it is not necessary for Ubuntu Server
, it is already installed - furthermore I have never installed in some distribution the Openssh's Client, but I am able to connect to some host with ssh
.
How to know the version of each one? In ssh(1) - Linux man page indicates:
-V' Display the version number and exit.
But is not clear if is for the server or client - in many tutorials has the same indication about to execute ssh -V
, but they do not indicate explicitly if is for the server or client.
Reason:
I want to know the client version, because suddenly my laptop with MacOS
can't do ssh
for some hosts anymore (it after to did do an upgrade in the hosts Ubuntu
from 20.04
to 22.04
), while for another laptops with Linux (as client) they can do the ssh to the same hosts yet - after to did do a research, seems it is due the client version - therefore I want to know the client versions from MacOS and Linux.
dpkg-query --showformat='${Version}\n' --show openssh-server openssh-client
. In my case both return the same version.sshd
service from two different releases of OpenSSH.dpkg - l | grep ssh
. I wonder why you even need to know the exact versions. It's not as if SSH(d) has seen major new features recently.ssh -vv localhost
will show both the client and server versions.sudo apt install openssh-server
was executed, internally was installed the client too? Even if I am wrong - I want to know what is the current OpenSSH Client available.