martes, 20 de diciembre de 2011

LINUX: tips TTY y PTS

TTY son terminales dentro de la misma maquina.Abiertas por el mismo usuario
PTS: sesiones remotas en la maquina

listar todas las sesiones:
[root@ns ~]# w
20:09:18 up 28 min, 6 users, load average: 0.00, 0.02, 0.03
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 - 19:59 8:17 0.01s 0.00s vi /etc/inittab
root tty2 - 20:07 34.00s 0.02s 0.02s -bash
root pts/1 192.168.100.170 20:08 0.00s 0.02s 0.00s w
root pts/2 192.168.100.101 20:08 5.00s 0.01s 0.00s wall
root pts/3 192.168.100.54 20:08 25.00s 0.01s 0.01s -bash
root pts/4 192.168.100.142 20:09 3.00s 0.02s 0.02s -bash


Bloquear todas las TTY en la maquina
Se comentan estas lineas en el archivo inittab:
[root@localhost ~]# vi /etc/inittab


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6


Servicios de Networking Habilitados y en listen.
[root@localhost ~]# netstat -atunp | grep -i list
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2958/hpiod
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2733/portmap
tcp 0 0 0.0.0.0:820 0.0.0.0:* LISTEN 2758/rpc.statd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2989/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3009/sendmail: acce
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2963/python
tcp 0 0 :::22 :::* LISTEN 2978/sshd
[root@localhost ~]#

No hay comentarios:

Publicar un comentario