test smb connection linux code example Example: test smb connection linux #ip replace it with yours sudo nmap --script smb-protocols ip