I've set OpenSSH server with private/public keys, with password login disabled.
I was wondering if there was a way to not even show the 'login:' prompt when someone without a key tries to connect.
EDIT
Okay ... There seems to be some confusion as to what I'm trying to achieve. So, here's a better explanation (I hope) ...
Current setup
Client with key connects, and goes through the process:
login as: username
BANNER
Authenticating with public key "Key name"
Passphrase for key "key name": *******
Welcome
username@hostname:~$
Client without key connects, and goes through process:
login as: username
BANNER
Server refused our key
What I want
client without key connects, and goes through process:
No key, go away.
~/.ssh, i.e. a user-specific directory, so it makes sense that you would always have to provide a username one way or another; it has to know which keys to compare. If you have the same username on each machine then SSH without a username assumes the one you are connecting to is the username on your local machine. – adamconkey Sep 02 '14 at 15:49ssh homerjsimpson@servername.org– user535733 Oct 19 '20 at 23:43