Which is the best method for authentication over SSH?

Morning once again members

As you may well know that security in Secure Shell(SSH) when it comes to client-server authentication can be done using two ways, that is:

  • User name and password authentication and

  • Public and private key authentication.

Which of the two above methods is the most appropriate way of client-server authentication over SSH that you could recommend for use?


It depends, but always use user and password for normal case, key authentication is not recommended until when you are trying to configure some cluster environments by using (corosync & pacemaker or heartbeat & pacemaker) and drbd (Distributed Replicated Block Device) and some other services which requires key authentication (not ssh key auth).


Great insight, is it possible to run SSH to login on multiple servers?

Up to my view Yes you can login into multiple servers by using ssh, pssh but here you can only retrieve the info from those hosts and you can save it in your local machine.


The above article is regarding pssh you can also use ssh here is the simple syntax

#for hosts in user@host1 user@host2; do ssh $hosts cat /etc/hosts; done