How do I know if my server has SSH?

How do I know if my server has SSH? Is there anyway to test?


For ssh client : ssh google.com; if it says command not found, you havent got it installed.

For ssh server : ssh localhost; if it doesn't do anything you haven't got ssh server.

If you are running debian/ubuntu :

apt-get install openssh-server

Absence of a public key is by no means the only way the ssh command can fail, so this is an approximation at best; it could be sufficient, though.

ssh $host "echo 2>&1" && echo $host OK || echo $host NOK

Oh, and being a bit more specific would be great.