Hack Forums
Nmap, and open ports. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Nmap, and open ports. (/showthread.php?tid=6324051)



Nmap, and open ports. - a_Drag0n - Apr 18, 2026

Hi,
When I scan services with nmap and see open ports like 22 (SSH) or 3306 (MySQL), how are those typically accessed?
With SSH I just get “connection reset by peer,” and I’m not sure how to connect to something like PostgreSQL or MySQL.

In this example, I am trying to log into a company’s database :D


RE: Nmap, and open ports. - DramaKing - Apr 18, 2026

(Apr 18, 2026 03:15 AM)a_Drag0n Wrote:  Hi,
When I scan services with nmap and see open ports like 22 (SSH) or 3306 (MySQL), how are those typically accessed?
With SSH I just get “connection reset by peer,” and I’m not sure how to connect to something like PostgreSQL or MySQL.

In this example, I am trying to log into a company’s database :D

Is authentication a new idea to you? Secure Shell? MySQL?

SSH: https://phoenixnap.com/kb/fix-connection-reset-by-peer-ssh-error

MySQL:
Code
msfconsole -q
use auxiliary/admin/mysql/mysql_sql
set rhosts 192.168.31.205
set username root
set password 123
set sql show databases
run
from hackingarticles.in

PostgreSQL: auxiliary/admin/postgres/postgres_sql
PostgreSQL (MSF)

I'd also recommend using the MSF database.
Code
msfdb init
workspace -a ssh
db_import /home/kali/nmap_ssh.xml
db_nmap <switches> 0.0.0.0/0


If you don't want to sound computer illiterate with no understanding of the real world, don't post things like trying to log in to a company database. You wouldn't know what to do in the incredibly unlikely event that you did.