On August 10th, 2025 - I set up an SSH honeypot on my home network, daring any and all hackers to try and break in. I did not actually run any special honeypot software - although they exist - I simply set an incredibly strong SSH password (30 characters long) on my little Raspberry Pi 4 Model B, and opened up port 22 on my ISP-provided SOHO router.
This little microcomputer has been sitting on my desk, fearlessly fending off thousands of intrusions across the globe. I thank it for its service.
Data Collection
#!/bin/bash...echo "SSH Login Attempts for $REPORTDAY" > $TMPFILEecho "===================================" >> $TMPFILEcat $AUTHLOG | grep "$REPORTDAY" | grep "Failed password" | grep -v "192.168.1" \| awk '{print $(NF-3)}' \| sort | uniq -c | sort -nr \| while read COUNT IP; doCOUNTRY=$(geoiplookup "$IP" | awk -F ': ' '{print $2}' | awk -F, '{print $2}')if [[ "$COUNTRY" == *"United States"* ]]; thenSTATE=$(whois "$IP" | grep StateProv | awk '{print $2}' | head -1)echo "$COUNT attempts from $IP (${COUNTRY:1} - $STATE)" >> $TMPFILEelif [[ "$COUNTRY" == "" ]]; thenecho "$COUNT attempts from $IP (Country not found)" >> $TMPFILEelseecho "$COUNT attempts from $IP (${COUNTRY:1})" >> $TMPFILEfi...USERS_TRIED=$(cat $AUTHLOG | grep "$REPORTDAY" | grep "$IP" | grep 'Invalid user' | awk '{print $8}' | uniq -c | head -5)echo "Users tried:" >> $TMPFILEecho "$USERS_TRIED" | while read ucount uname; doprintf " %s %s\n" "$ucount" "$uname" >> "$TMPFILE"doneecho "---------------" >> $TMPFILEdone...
Visualization
Top 20 Attacking IPs
The top five attacking IPs were all from China. The top one (8[.]140[.]229[.]224) had 957 attempts over the past month and a half. Looking at this IP in Shodan gives us this information:
Attempts By Country
While the graph shows top 20, only the top 10 users tried (excluding attempts without a username) were really relevant:
After that you may see only a handful of attempts with other users.
This graph does not give any more information than previous graphs, but it is a quick and helpful visual into where these attacks are originating. Of course, the darker a country appears, the more honeypot intrusion attempts originated from there.
As expected, the largest geopolitical superpowers (that also quite-publicly flame one another) attempt to hack the most. Makes you wonder if the rest of the global Internet is merely a medium for the U.S. and China to attack one another, but I digress.