SSH Server listener to log incoming authentication data.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Opens a ssh server and listens for authentication data (login and password). Input is logged.

This code is created to collect most popular passwords via AWS based experiment: collect passwords blog post.

Generate SSH key (optional)

ssh-keygen -t rsa -b 4096 -C ""

Leave passphrase empty.

Run listener

go run sshlistener.go -private=id_rsa -output=log.out -port=2022


  • private: path to a private key
  • output: path to a log file to be created or appended
  • port: to listen at

Connect to the listener

ssh testuser@ -p2022

Listener always replies with invalid password, but data is logged into configured log file.