Outils pour utilisateurs

Outils du site


tech:notes_rsh_rcp

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_rsh_rcp [2026/01/22 10:52] Jean-Baptistetech:notes_rsh_rcp [2026/01/22 19:51] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 <!DOCTYPE markdown> <!DOCTYPE markdown>
-{{tag>Brouillon ssh}}+{{tag>ssh xinetd inetd}}
  
 # Notes rsh rcp # Notes rsh rcp
Ligne 7: Ligne 7:
 * http://jlbicquelet.free.fr/aix/configuration/rsh.php * http://jlbicquelet.free.fr/aix/configuration/rsh.php
 * https://www.verylazytech.com/network-pentesting/rsh-port-514 * https://www.verylazytech.com/network-pentesting/rsh-port-514
 +* https://www.veritas.com/support/en_US/doc/79728803-79728850-0/v9345697-79728850
  
 +Voir aussi :
 +* https://fr.wikipedia.org/wiki/GNU_inetutils
  
 ** Ne pas utilser ce truc ** ** Ne pas utilser ce truc **
Ligne 14: Ligne 17:
  
 Source : `man rsh` Source : `man rsh`
 +
 +
 +Also note that the design of the .rhosts system is COMPLETELY INSECURE except on a carefully firewalled private network. Under all other circumstances, rshd should be disabled entirely. 
 +
 +Source : `man in.rshd`
 +
 +
  
 rsh : Ce programme est issu du package rlogin rsh : Ce programme est issu du package rlogin
Ligne 47: Ligne 57:
 echo "localhost" >> ~/.rhosts echo "localhost" >> ~/.rhosts
 ~~~ ~~~
 +
 +Le fichier hosts.equiv / .rhosts autorise ou interdit à des ordinateurs et à des utilisateurs l'utilisation des commandes r (telles que rlogin, rsh ou rcp) sans donner de mot de passe. 
  
 `/etc/hosts.equiv` global trusted host-user pairs list `/etc/hosts.equiv` global trusted host-user pairs list
Ligne 58: Ligne 70:
  
 ~~~ ~~~
 +# hostname [username]
 +
 somehost somehost
 somehost username somehost username
 +
 ~~~ ~~~
  
 +
 +For root login to succeed here with pam_securetty, "rsh" must be listed in /etc/securetty.
 +~~~bash
 +echo "rsh" >> /etc/securetty
 +~~~
  
  
Ligne 81: Ligne 101:
 ~~~bash ~~~bash
 rsh -l user localhost rsh -l user localhost
 +rlogin -l user localhost
 +# NOTE : rsh without a command switches to rlogin.
 +
 +rsh -l user localhost command
 ~~~ ~~~
 +
  
  
Ligne 98: Ligne 123:
 ~~~ ~~~
  
 +## Cas 1
  
  
-## Autres+Sur le client - NOK 
 +~~~ 
 +test@rsh-cli:~$ rcp TEST4 user1@rsh-srv:/home/user1/ 
 +Permission denied. 
 +~~~
  
 +Sur le serveur
 ~~~bash ~~~bash
-echo "rsh" >> /etc/securetty+echo "rsh-cli test" >> /home/user1/.rhosts
 ~~~ ~~~
 +
 +Sur le client - OK
 +~~~
 +test@rsh-cli:~$ rcp TEST4 user1@rsh-srv:/home/user1/
 +~~~
 +
 +
 +
 +## Autres
 +
  
 Dans un conteners  Dans un conteners 
Ligne 121: Ligne 162:
 # #
 ~~~ ~~~
 +
 +
 +-----
 +
 +~~~
 +root       25225        0 Jan20 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
 +root     3072532   25225  0 11:02 ?        00:00:00 in.rlogind
 +root     3072597 3072532  0 11:02 ?        00:00:01 login -- user1
 +user1      3072724 3072597  0 11:02 pts/4    00:00:00 -ksh
 +~~~
 +
 +Bizarre, je ne vois pas le process 'sleep' que j'ai lancé et qui tourne toujours. Même avec plusieurs essais. 
 +Le dernier processus '-ksh' n'a pas d'enfant.  
 +
 +~~~
 +# ss -tlnp |grep xinetd
 +0      64                             *:513                           *:     users:(("xinetd",25225,5))
 +0      64                             *:514                           *:     users:(("xinetd",25225,6))
 +~~~
 +
 +`/etc/xinetd.d/rsh`
 +
 +~~~
 +# default: on
 +# description: The rshd server is the server for the rcmd(3) routine and, \
 +#       consequently, for the rsh(1) program.  The server provides \
 +#       remote execution facilities with authentication based on \
 +#       privileged port numbers from trusted hosts.
 +service shell
 +{
 +        disable = no
 +        socket_type             = stream
 +        wait                    = no
 +        user                    = root
 +        log_on_success          += USERID
 +        log_on_failure          += USERID
 +        server                  = /usr/sbin/in.rshd
 +}
 +~~~
 +
  
 FIXME FIXME
  
  
tech/notes_rsh_rcp.1769075564.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki