# WHATPORT(512)

## NAME

port 512 — exec (BSD rexec) — BSD rexec — run a command on a remote host, with the username and password sent in cleartext.

Protocol: TCP  
IANA registry

## DESCRIPTION

IANA registers TCP 512 as "exec": remote process execution with authentication performed using passwords and UNIX login names. A client opens the connection, sends a NUL-separated username, password, and command line, and the rexecd server runs the command and streams back its output. It is the oldest and weakest of the three BSD r-services (512 exec, 513 rlogin, 514 rsh) and virtually every modern distribution ships rexecd disabled or not at all. On UDP the same number is comsat/biff, the local new-mail notifier, which is a different and equally obsolete service.

## EXPOSURE

**Do not expose.** The password crosses the wire in plaintext on every invocation and the whole session is unencrypted — there is no configuration that makes this safe. Replace it with SSH.

## CHECK

```sh
nc -vz -w 3 TARGET 512
```

## SEE ALSO

- iana — [IANA Service Name and Transport Protocol Port Number Registry — 512](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=512) (iana.org)

---

HTML: <https://whatport.net/512/> · JSON: <https://whatport.net/512.json> · full dataset: <https://whatport.net/ports.json>
