Am 02.04.13 02:56, schrieb Alexander Lamaison:
> A user has asked us to support public-key login without a username.
> Does the spec allow a blank username for SSH auth?
>
> I can't find anything expressly forbidding it, but neither can I find
> mention anywhere of anyone actually doing it.
>
> Thanks,
>
> Alex
>
The simplest case is you are user1 at local and type
ssh remote
then ssh tries to connect you to user1@remote. And if there is a public
key in the remote /home/user1/.ssh/authorized_keys file corresponding to
the private key of user1 at local then this key will be used in a
default configuration of sshd.
In a more complicated setup user1 at local migth have a section
Host myHost
Hostname a_valid_host
User me
IdentityFile ~/.ssh/my_secret_key
in his ~/.ssh/config.
Then
ssh myHost
will be the same as
ssh -i ~/.ssh/my_secret_key me@a_valid_host
Maybe you should read man ssh_config for more information.
Hope this helps
Wolfgang