Forcing public key authentication on ssh client Aug 13, 2015 by Marcelo Jacobus Just do that. ssh user@host -o PreferredAuthentications=publickey And if you want to use a different key ssh user@host -i /path/to/id_rsa