El podcast
Notas sobre el podcast
-
-L: conecta por SSH a un HOST. Una vez allí abre una conexión TCP a otro HOST:PORT y abre un puerto TCP local que al conectarnos nos envía al HOST:PORT anterior, o sea, portforwarding.
-
-L [bind_address:]port:host:hostport]
-
-W: conecta por SSH a un HOST, una vez allí abre una conexión TCP a otro HOST:PORT y nos devuelve en la stdin/stdout el contenido de este último enlace TCP
-
-W host:hostport
-
-R publicar un puerto: conecta por SSH a un host y una vez allí publica un puerto TCP, cuando un cliente se conecta a este puerto TCP accede por SSH a la máquina que ha lanzado el enlace SSH y abre otro enlace TCP a otra IP:PORT.
-
-R[bind_address:]port:host:hostport
-
-D socks5: conecta por SSH a un HOST y después publica un puerto SOCKS5/TCP, es decir, que nos podemos conectar a este puerto local y salir a internet a través de la IP del HOST al que nos hemos conectado por SSH
-
-D [bind_address:]port
-
-w tunel: conecta por SSH a un HOST y el socket que se ha usado para hacer el enlace SSH se conecta a dos interfaces de tipo TUN, una en cada extremo del socket. Así pues, si configuramos las correspondientes IPs en las interfaces TUN tenemos un tunel/VPN montada entre los extremos.
-
-w local_tun[:remote_tun]
HPN-SSH
La web de: HPN-SSH -> especialmente interesante: Dynamic Windows and None Cipher
-
trabaja con tamaño de ventana dinámica
-
trabaja sin cifrado cuando un enlace no tiene terminal asociado, a menudo usado para el paso de archivos
Las pruebas:
-
Openssh 5.3p1 + hpn-13 (solo el patch: Dynamic Windows and None Cipher)
-
después de aplicar el patch: openssh5.3-dynwindow_noneswitch.diff.gz
-
modificamos el archivo: sshconnect2.c
<br><pre>linia: 366<br>- if (!tty_flag) /* no null on tty sessions */<br>+ if (1) /* no null on tty sessions */</pre><br>
así podemos hacer SSH sin cifrar solo después de haber hecho el login.
ejemplo amplio de ancho de banda de un SSH con cifrado aes128-ctr, usando ventana dinámica:
scp -v -oNoneEnabled=no -oNoneSwitch=yes fitxer root@127.0.0.1:/tmp/ssh
o
ssh -v -oNoneEnabled=no -oNoneSwitch=yes root@127.0.0.1 "dd if=/dev/zero"|pv > /dev/null
velocitat de transferència: <strong>13.7MB/s</strong>
- debug ciphers, una única negociación de ciphers:
debug1: AUTH STATE IS 0
debug1: REQUESTED ENC.NAME is '<strong>aes128-ctr</strong>'
debug1: kex: server-><strong>client</strong> aes128-ctr hmac-md5 none
debug1: REQUESTED ENC.NAME is '<strong>aes128-ctr</strong>'
debug1: kex: client-><strong>server</strong> aes128-ctr hmac-md5 none
ejemplo sin cifrado, usando ventana dinámica:
scp -v -oNoneEnabled=yes -oNoneSwitch=yes fitxer root@127.0.0.1:/tmp/ssh
o
ssh -v -oNoneEnabled=yes -oNoneSwitch=yes root@127.0.0.1 "dd if=/dev/zero"|pv > /dev/null
velocitat de transferència: <strong>37.4MB/s</strong>
- antes del pass de login:
debug1: <strong>AUTH</strong> STATE IS <strong>0</strong>
debug1: REQUESTED ENC.NAME is '<strong>aes128-ctr</strong>'
debug1: kex: server-><strong>client</strong> aes128-ctr hmac-md5 none
debug1: REQUESTED ENC.NAME is '<strong>aes128-ctr</strong>'
debug1: kex: client-><strong>server</strong> aes128-ctr hmac-md5 none
- después de autenticarse:
debug1: <strong>AUTH</strong> STATE IS <strong>1</strong>
debug1: REQUESTED ENC.NAME is '<strong>none</strong>'
debug1: Requesting NONE. Authflag is 1
debug1: None requested post authentication.
debug1: kex: server-><strong>client</strong> none hmac-md5 none
debug1: REQUESTED ENC.NAME is '<strong>none</strong>'
debug1: Requesting NONE. Authflag is 1
debug1: None requested post authentication.
debug1: kex: client-><strong>server</strong> none hmac-md5 none