Outils pour utilisateurs

Outils du site


tech:notes_rsh_rcp

Ceci est une ancienne révision du document !


Notes rsh rcp

Voir :

Ne pas utilser ce truc

Use of rsh is discouraged due to the inherent insecurity of host-based authentication.

Source : man rsh

rsh : Ce programme est issu du package rlogin

Protocole

Ports

rsh hostname (port 513)
rsh hosname commande (port 514)

Coté serveur

Avec le compte root

apt-get install rsh-client rsh-server
/etc/init.d/openbsd-inetd status
/etc/init.d/openbsd-inetd start
/etc/init.d/openbsd-inetd status
echo "localhost" >> ~/.rhosts

/etc/hosts.equiv global trusted host-user pairs list

~/.rhosts per-user trusted host-user pairs list

rsh, rlogin et ssh utilisent ces fichiers

Syntaxe de .rhosts hosts.equiv

somehost
somehost username

Coté client

Avec le compte utilisateur

apt-get install rsh-client
echo plop > plop.txt
rcp plop.txt root@localhost:/tmp/
rcp plop.txt localhost:/tmp/
rsh -l user localhost

Shell meta-characters escape

Shell meta-characters which are not quoted are interpreted on local machine, while quoted meta-characters are interpreted on the remote machine

Appends the remote file remotefile to the local file localfile

rsh otherhost cat remotefile >> localfile

Appends remotefile to other_remotefile

rsh otherhost cat remotefile ">>" other_remotefile

Autres

echo "rsh" >> /etc/securetty

Dans un conteners

# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 14:51 pts/0    00:00:00 /bin/sh
root           7       1  0 14:51 pts/0    00:00:00 bash
root         942       1  0 15:08 ?        00:00:00 /usr/sbin/inetd
root        1071       7  0 15:39 pts/0    00:00:00 ps -ef
# rsh localhost   
rlogind[1078]: pam_rhosts(rlogin:auth): allowed access to root@localhost as root
#

FIXME

tech/notes_rsh_rcp.1769075496.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki