---
title: "513 - Pentesting Rlogin"
section: "Network Services"
sectionSlug: "network-services-pentesting"
sourcePath: "src/network-services-pentesting/pentesting-rlogin.md"
sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/pentesting-rlogin.md"
sha: "188de82beb54e70956b2952367a0af91d26758b8"
isIndex: false
modified: true
license: "CC-BY-NC-4.0"
---
# 513 - Pentesting Rlogin
## Basic Information
The BSD `rlogin` protocol provides a remote terminal over TCP port 513. Its trusted-host mechanism can bypass password authentication, and the protocol does not protect the session with modern transport encryption; use SSH instead for administration.<sup>[[1]](#references)</sup>
**Default port:** 513/TCP
```text
PORT STATE SERVICE
513/tcp open login
```
## Login
Install a client on Debian-based systems:
```bash
sudo apt-get install rsh-client
```
Then test an authorized account. If the server's trust configuration permits passwordless access, no password prompt will appear:
```bash
rlogin <IP> -l <username>
# Explicitly test the privileged account only when it is in scope:
rlogin <IP> -l root
```
Pay particular attention to privileged accounts and trust entries in `/etc/hosts.equiv` and users' `.rhosts` files. RFC 1282 warns that passwordless trusted-host authentication is dangerous because a compromised trusted host can expose accounts on every server that trusts it.<sup>[[1]](#references)</sup>
### [Brute force](https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/generic-hacking/brute-force.md#rlogin)
## Find trust files
```bash
find / -name .rhosts 2>/dev/null
```
## References
- [1] [RFC 1282 - BSD Rlogin](https://datatracker.ietf.org/doc/html/rfc1282)