---
title: "514 - Pentesting Rsh"
section: "Network Services"
sectionSlug: "network-services-pentesting"
sourcePath: "src/network-services-pentesting/pentesting-rsh.md"
sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/pentesting-rsh.md"
sha: "188de82beb54e70956b2952367a0af91d26758b8"
isIndex: false
modified: true
license: "CC-BY-NC-4.0"
---
# 514 - Pentesting Rsh
## Basic Information
The remote shell service (`rsh`) historically used `/etc/hosts.equiv` and per-user `.rhosts` files to trust remote hosts and users. This host-based model depends on IP-address and Domain Name System (DNS) assumptions and is vulnerable to address or name-resolution spoofing, especially on a local network.<sup>[[1]](#references)</sup>
Because `.rhosts` resides in a user's home directory, an attacker who can modify that file—for example, through an exposed NFS home directory—may be able to add a trusted host or user.<sup>[[1]](#references)</sup>
**Default port:** 514/TCP
## Login
```bash
rsh <IP> <Command>
rsh <IP> -l domain\user <Command>
rsh domain/user@<IP> <Command>
rsh domain\\user@<IP> <Command>
```
### [**Brute Force**](https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/generic-hacking/brute-force.md#rsh)
## References
- [1] [Overview of the Remote Shell RSH - SSH Academy](https://www.ssh.com/ssh/rsh)