I have set Remote Login to "on" for my Mac OS X so that I can ssh into it from somewhere else. For security reason, I want to disable password authentication and only allow public key authentication.
I have the following line in /etc/ssh/ssh_config:
However, it also prevents me from login to other servers from my Mac using password authentication:
$ sftp username@some_host Permission denied (publickey,password). Connection closed
I don't have permission to change settings on the
some_host and have to use password authentication. How can I configure my ssh correctly so that it requires public key authentication for inbound connection only, but not the other way around?