Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A ssh server that knows who you are. $ ssh whoami.filippo.io

License

NotificationsYou must be signed in to change notification settings

FiloSottile/whoami.filippo.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

An ssh server that knows who you are.

Try it (it's harmless)

ssh whoami.filippo.io

ED25519 key fingerprint isSHA256:qGAqPqtlvFBCt4LfMME3IgJqZWlcrlBMxNmGjhLVYzY.
RSA key fingerprint isSHA256:O6zDQjQws92wQSA41wXusKquKMuugPVM/oBZXNmfyvI.

How it works

When ssh tries to authenticate via public key, it sends the server all your public keys, one by one, until the server accepts one. One can take advantage of this to enumerate all the client's installed public keys.

On the other hand, GitHub allows everyone to download users' public keys (which is very handy at times). Ben Cox took advantage of that andbuilt a dataset of all GitHub public keys.

This is a pretty vanillagolang.org/x/crypto/ssh Go server that will advertise(publickey,keyboard-interactive) authentication. It won't accept any public key, but it will take a note of them. Once the client is done with public keys, it will trykeyboard-interactive, which the server will accept without sending any challenge, so that no user interaction is required.

Then it just lets you open a shell+PTY, uses the public keys and Ben's database to find your username, asks the GitHub API your real name, prints all that and closes the terminal.

All the interesting bits are inserver.go.

How do I stop it?

If this behavior is problematic for you, you can tell ssh not to present your public keys to the server by default.

Add these lines at the end of your~/.ssh/config (after other "Host" directives)

Host *    PubkeyAuthentication no    IdentitiesOnly yes

And then specify what keys should be used for each host

Host example.com    PubkeyAuthentication yes    IdentityFile ~/.ssh/id_rsa    # IdentitiesOnly yes # Enable ssh-agent (PKCS11 etc.) keys

If you want you can use different keys so that they can't be linked together

Host github.com    PubkeyAuthentication yes    IdentityFile ~/.ssh/github_id_rsa

About

A ssh server that knows who you are. $ ssh whoami.filippo.io

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    Contributors4

    •  
    •  
    •  
    •  

    [8]ページ先頭

    ©2009-2025 Movatter.jp