TELNET
(USUARI I SERVIDOR)
TELNET
És un programa de comunicacions que permet emular un terminal remot, fent servir el protocol que també es diu telnet.
Per que un ordinador remot accepti connexions remotes cal que tingui activat el servei telnetd (daemon de telnet)
COM INSTAL·LAR TELNETD
Farem servir l'ordre
sudo apt install telnetd
que ens instal·la el programa a l'ordinador i activa el servei telnetd
COM VERIFICAR ELS SERVEIS ACTIUS
Podem verificar el funcionament amb netstat. Potser calgui instal·lar-lo abans amb
sudo apt install net-tools
Per verificar tots els serveis actius del sistema amb netstat cal escriure
netstat -tlp
Veurem que tenim actius en aquest equip els serveis ssh i telnet que ja coneixem
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:ipp 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:telnet 0.0.0.0:* LISTEN -
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN -
tcp6 0 0 [::]:ssh [::]:* LISTEN -
tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN -
UTILITATS DEL TELNET
El programa telnet ens permet accedir al terminal d'un ordinador remot.
Ens caldrà conèixer:
l'adreça IP de l'ordinador remot (IPADDR) o el seu nom a internet
el nom d'usuari que hem de fer servir a l'ordinador remot
la clau d'accés de l'usuari
Fent servir l'ordre qualsevol de les ordres següents accedim a l'ordinador remot
telnet IPADDR
telnet IPADDR 23
EXEMPLE
telnet 192.168.250.101
Trying 192.168.250.101...
Connected to 192.168.250.101.
Escape character is '^]'.
Ubuntu 22.04.3 LTS
TALLER228 login: taller228
Password:
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 6.2.0-37-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
No està activat el mateniment expandit de seguretat per a Applications
Es poden aplicar immediatament 0 actualitzacions.
7 actualitzacions de seguretat addicional es poden aplicar amb ESM Apps.
Conegueu més sobre l'activació de servei Apps ESM at https://ubuntu.com/esm
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
EXEMPLES
telnet IPADDR 80 web estandar
telnet IPADDR 5000 web flask
Haurem d'escriure les ordres del servidor web (HEAD o GET)
HEAD HTTP/1.1
HOST calonge.org