Servidores

ssh -L: quién puede usar el puerto reenviado (127.0.0.1 frente a 0.0.0.0), ExitOnForwardFailure, -N y AllowTcpForwarding no (prueba con un sshd desechable)

Publicado el 1 de diciembre de 2026Última revisión: 1 de diciembre de 202620 min de lectura

Resultado de la prueba

con OpenSSH_9.6p1 en Ubuntu 24.04.5, ssh -N -L 18081:127.0.0.1:18080 escuchó en 127.0.0.1 y [::1]; curl por 127.0.0.1 recibió la página interna y por la IP de la máquina (172.30.0.2) falló con código 7. -L 0.0.0.0:..., -L *:..., -g y -o GatewayPorts=yes abrieron el puerto a todas las interfaces (curl por 172.30.0.2 dio la página con los tres primeros); GatewayPorts yes en el sshd_config del servidor no cambió nada (siguió en 127.0.0.1 y [::1]). curl, un curl lanzado como el usuario nobody y un socket Python, sin claves, usaron el túnel. Con el puerto 18081 ocupado en 127.0.0.1, ssh -f -N -L 18081:... salió con 0 aunque también con ExitOnForwardFailure=yes (enlazó [::1]); con -L 127.0.0.1:18081:... y ExitOnForwardFailure=yes salió con 255 y sin él quedó un ssh vivo (código 0) con el aviso Could not request local forwarding. Con AllowTcpForwarding remote o no (y con Match, y con permitopen en la clave) ssh siguió vivo y el puerto local escuchando, pero curl recibió una conexión cerrada sin datos (código 52 o 56, varía entre ejecuciones) y sshd registró el rechazo. Mismos resultados en 3 de 3 ejecuciones.

Contenido

Este artículo no contiene enlaces de afiliado.

Un túnel ssh -L parece una operación sin riesgo: abres un puerto local y el tráfico viaja cifrado hasta un servicio interno. Lo que se suele dar por hecho (que solo tú lo usas, que ssh avisa si falla, que el servidor lo prohíbe con una línea) se puede medir. Aquí se hace contra un sshd temporal, con una página interna falsa como destino. Para otras comprobaciones de sshd_config, mira qué directiva gana cuando hay un Match y qué hace StrictModes con authorized_keys.

Condiciones: OpenSSH_9.6p1 Ubuntu-3ubuntu13.20 (cliente y servidor), Ubuntu 24.04.5 LTS, Linux 7.0.0-1017-oracle, bash 5.2.21, usuario normal (uid 10002) para ssh y sshd; solo una comprobación usa sudo -u nobody para lanzar un curl como otro usuario. El sshd se arranca con /usr/sbin/sshd -f y una configuración temporal: puerto 18022, ListenAddress 127.0.0.1, clave de host y de usuario recién generadas, UsePAM no, StrictModes no. Solo puede autenticar al usuario que lo lanza. El servicio "interno" es python3 -m http.server en 127.0.0.1:18080; el puerto reenviado es el 18081. Todo vive en un directorio de mktemp -d; la configuración real de sshd del sistema no se lee ni se toca, y al salir el script borra el directorio y mata los procesos (la última línea de la salida comprueba que no quedan procesos, ni el directorio, ni puertos abiertos). El script se ejecutó 3 veces y la salida fue idéntica en las 3 (comparada sin la cabecera; los puertos de origen de los clientes se sustituyen por N y los pid por N). No se probó -R ni -D, ProxyJump, ControlMaster, otro sistema operativo, otras versiones de OpenSSH, un servidor con PAM, otra máquina de la red como cliente (la IP de la máquina se probó desde la propia máquina), ni túneles hacia máquinas remotas reales: el destino siempre fue el propio loopback. El texto lo redacté con ayuda de una IA a partir de la salida del script, y las cifras salen de esas ejecuciones.

Salida de la ejecución 1

Idéntica en las ejecuciones 2 y 3. Antes de la primera ejecución el script comprueba que la página interna se ve en 127.0.0.1:18080 (SECRET-INTERNAL-PAGE) y que no se ve por la IP de la máquina, 172.30.0.2 (no).

[1] default bind address (ssh -N -L 18081:127.0.0.1:18080):
  listening on: 127.0.0.1:18081 [::1]:18081 
    curl 127.0.0.1:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
    curl 172.30.0.2:18081 -> exit=7 body=(empty)
  with -L localhost:18081:...:
    listening on: 127.0.0.1:18081 [::1]:18081 
[2] making it listen on all interfaces:
  -L 0.0.0.0:18081:127.0.0.1:18080
    listening on: 0.0.0.0:18081 
    curl 172.30.0.2:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  -L *:18081:127.0.0.1:18080
    listening on: 0.0.0.0:18081 [::]:18081 
    curl 172.30.0.2:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  -g -L 18081:127.0.0.1:18080
    listening on: 0.0.0.0:18081 [::]:18081 
    curl 172.30.0.2:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  -o GatewayPorts=yes -L 18081:127.0.0.1:18080
    listening on: 0.0.0.0:18081 [::]:18081 
  server side GatewayPorts yes in sshd_config, client plain -L 18081:127.0.0.1:18080:
    listening on: 127.0.0.1:18081 [::1]:18081 
[3] who can use the forwarded port (no key, no ssh, only a TCP client):
  process using the key: ssh pid owned by uid 10002
  plain curl without any credentials:
    curl 127.0.0.1:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  curl run as another local user (sudo -u nobody, uid 65534), no key, no ssh:
    exit=0 body=SECRET-INTERNAL-PAGE
  python socket from a different process, raw HTTP request:
    reply body: SECRET-INTERNAL-PAGE
  listener owner (ss -ltnp):
    127.0.0.1:18081 users:(("ssh",pid=N,fd=5))
    [::1]:18081 users:(("ssh",pid=N,fd=4))
[4] port already in use (another process holds 127.0.0.1:18081):
  -f -N -L 18081:... (default bind: 127.0.0.1 and ::1), without ExitOnForwardFailure:
    ssh exit=0
    > bind [127.0.0.1]:18081: Address already in use
    ssh still running afterwards: 1 process(es); listening: 127.0.0.1:18081 [::1]:18081 
  same with -o ExitOnForwardFailure=yes:
    ssh exit=0
    > bind [127.0.0.1]:18081: Address already in use
    ssh still running afterwards: 1 process(es); listening: 127.0.0.1:18081 [::1]:18081 
  -L 127.0.0.1:18081:... (only the busy address), -f, without ExitOnForwardFailure:
    ssh exit=0
    > bind [127.0.0.1]:18081: Address already in use
    > channel_setup_fwd_listener_tcpip: cannot listen to port: 18081
    > Could not request local forwarding.
    ssh still running afterwards: 1 process(es)
  -L 127.0.0.1:18081:... with -o ExitOnForwardFailure=yes, -f:
    ssh exit=255
    > bind [127.0.0.1]:18081: Address already in use
    > channel_setup_fwd_listener_tcpip: cannot listen to port: 18081
    > Could not request local forwarding.
    ssh still running afterwards: 0 process(es)
  -L 127.0.0.1:18081:... without -f, without ExitOnForwardFailure, timeout 2 s:
    exit=124 (124 = still running when timeout killed it)
    > bind [127.0.0.1]:18081: Address already in use
    > channel_setup_fwd_listener_tcpip: cannot listen to port: 18081
    > Could not request local forwarding.
  -L 127.0.0.1:18081:... without -f, with ExitOnForwardFailure=yes, timeout 2 s:
    exit=255
    > bind [127.0.0.1]:18081: Address already in use
    > channel_setup_fwd_listener_tcpip: cannot listen to port: 18081
    > Could not request local forwarding.
  what answers on 127.0.0.1:18081 while the forward failed: OTHER-PROCESS-PAGE (the blocker's own directory, not the tunnel)
[5] -N versus a command:
  ssh -L ... true (a command, no -N):
    exit=0; port listening after it returned: 
  ssh -L ... sleep 2, curl during the sleep:
    curl 127.0.0.1:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  ssh -N -L ... (no remote command), timeout 2 s:
    exit=124
  ssh -N with a command appended (true):
    exit=124 (the command is ignored if 124)
[6] AllowTcpForwarding in sshd_config:
  sshd_config: AllowTcpForwarding yes
    ssh still running: yes; local port listening: 127.0.0.1:18081 [::1]:18081 
    curl 127.0.0.1:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  sshd_config: AllowTcpForwarding local
    ssh still running: yes; local port listening: 127.0.0.1:18081 [::1]:18081 
    curl 127.0.0.1:18081 -> exit=0 body=SECRET-INTERNAL-PAGE
  sshd_config: AllowTcpForwarding remote
    ssh still running: yes; local port listening: 127.0.0.1:18081 [::1]:18081 
    curl 127.0.0.1:18081 -> exit=52 or 56 (connection closed with no data; the code varies between runs) body=(empty)
    sshd log> refused local port forward: originator 127.0.0.1 port N, target 127.0.0.1 port 18080
  sshd_config: AllowTcpForwarding no
    ssh still running: yes; local port listening: 127.0.0.1:18081 [::1]:18081 
    curl 127.0.0.1:18081 -> exit=52 or 56 (connection closed with no data; the code varies between runs) body=(empty)
    sshd log> refused local port forward: originator 127.0.0.1 port N, target 127.0.0.1 port 18080
  yes globally, Match User agent -> no:
    curl 127.0.0.1:18081 -> exit=52 or 56 (connection closed with no data; the code varies between runs) body=(empty)
    sshd log> refused local port forward: originator 127.0.0.1 port N, target 127.0.0.1 port 18080
  options on the key: restrict,port-forwarding,permitopen="127.0.0.1:9":
    curl 127.0.0.1:18081 -> exit=52 or 56 (connection closed with no data; the code varies between runs) body=(empty)
    sshd log> Received request from 127.0.0.1 port N to connect to host 127.0.0.1 port 18080, but the request was denied.

Lo que se ve

Qué significa

Script completo

#!/bin/bash
# ssh -L pitfalls measured against a throwaway sshd run as the current non-root user
# (own port, own host key, own authorized_keys, all in mktemp -d, removed on exit).
# 1 default bind address; 2 explicit bind / -g / GatewayPorts; 3 who can use the port;
# 4 port already in use +/- ExitOnForwardFailure; 5 -N vs a command; 6 AllowTcpForwarding.
# The system sshd configuration is never read or modified. Usage: test-ssh-local-forward.sh
set -u
export LC_ALL=C.UTF-8
T=$(mktemp -d /tmp/sshfwd.XXXXXX) || exit 1
SP=18022   # throwaway sshd
WP=18080   # web service on the "remote" side, loopback only
FP=18081   # local forwarded port
PIDS=()
cleanup(){ [ -f "$T/sshd.pid" ] && kill "$(cat "$T/sshd.pid")" 2>/dev/null
  for p in "${PIDS[@]:-}"; do [ -n "$p" ] && kill "$p" 2>/dev/null; done; pkill -u "$(id -u)" -f "$T" 2>/dev/null; sleep 0.5; rm -rf "$T"
  echo "after cleanup: temp dir exists: $([ -e "$T" ] && echo yes || echo no); processes left: $(pgrep -u "$(id -u)" -f "$T" | wc -l); ports $SP/$WP/$FP listening: $(ss -ltn | grep -cE ":($SP|$WP|$FP) ")"; }
trap cleanup EXIT
EXTIP=$(hostname -I | awk '{print $1}')
echo "$(ssh -V 2>&1); $(. /etc/os-release; echo "$PRETTY_NAME"); $(uname -sr); bash ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}.${BASH_VERSINFO[2]}; uid $(id -u) (non-root: $([ "$(id -u)" != 0 ] && echo yes || echo no))"

ssh-keygen -q -t ed25519 -N '' -f "$T/hostkey"
ssh-keygen -q -t ed25519 -N '' -f "$T/userkey"
cp "$T/userkey.pub" "$T/authorized_keys"; chmod 600 "$T/authorized_keys"
mkdir "$T/www" "$T/www2"; echo "OTHER-PROCESS-PAGE" > "$T/www2/index.html"; echo "SECRET-INTERNAL-PAGE" > "$T/www/index.html"
python3 -m http.server "$WP" --bind 127.0.0.1 --directory "$T/www" >/dev/null 2>&1 & PIDS+=($!)

startsshd(){ # startsshd EXTRA_CONFIG_LINES
  [ -f "$T/sshd.pid" ] && kill "$(cat "$T/sshd.pid")" 2>/dev/null; sleep 0.3
  cat > "$T/sshd_config" <<CFG
Port $SP
ListenAddress 127.0.0.1
HostKey $T/hostkey
PidFile $T/sshd.pid
AuthorizedKeysFile $T/authorized_keys
UsePAM no
PasswordAuthentication no
StrictModes no
LogLevel VERBOSE
$1
CFG
  /usr/sbin/sshd -f "$T/sshd_config" -E "$T/sshd.log" || { echo "sshd failed"; cat "$T/sshd.log"; exit 1; }
  for i in $(seq 50); do ss -ltn "sport = :$SP" | grep -q LISTEN && break; sleep 0.1; done
}
SSHO=(-F /dev/null -i "$T/userkey" -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -o BatchMode=yes -p "$SP")
mkargs(){ # mkargs OPTIONS... [-- COMMAND...] : builds ARGS; the destination sits between options and command
  local o=(); while [ $# -gt 0 ] && [ "$1" != -- ]; do o+=("$1"); shift; done; [ "${1:-}" = -- ] && shift
  ARGS=("${SSHO[@]}" "${o[@]}" 127.0.0.1 "$@"); }
sshx(){ mkargs "$@"; ssh "${ARGS[@]}"; }
tsshx(){ local t=$1; shift; mkargs "$@"; timeout "$t" ssh "${ARGS[@]}"; }
fwd(){ # fwd LOGNAME ssh-args... : background ssh, wait until the local port listens or ssh exits
  local log=$1; shift
  mkargs "$@"; ssh "${ARGS[@]}" >"$T/$log.out" 2>"$T/$log.err" & FPID=$!; PIDS+=($FPID)
  for i in $(seq 50); do ss -ltn "sport = :$FP" | grep -q LISTEN && return 0; kill -0 $FPID 2>/dev/null || return 1; sleep 0.1; done; return 1
}
killall_ssh(){ pkill -u "$(id -u)" -f "$T/userkey" 2>/dev/null; sleep 0.3; }
stopfwd(){ kill "$FPID" 2>/dev/null; wait "$FPID" 2>/dev/null; killall_ssh; for i in $(seq 30); do ss -ltn "sport = :$FP" | grep -q LISTEN || break; sleep 0.1; done; }
listen(){ ss -ltn "sport = :$FP" | awk 'NR>1{print $4}' | sort | tr '\n' ' '; }
get(){ # get HOST: HTTP fetch through the forwarded port, prints result
  local o rc; o=$(curl -s -m 3 "http://$1:$FP/" 2>&1); rc=$?
  case $rc in 52|56) rc="52 or 56 (connection closed with no data; the code varies between runs)";; esac
  echo "    curl $1:$FP -> exit=$rc body=${o:-(empty)}"
}
tgt=127.0.0.1:$WP
startsshd "AllowTcpForwarding yes"
SSHD_VER=$(ps -o args= -p "$(cat "$T/sshd.pid")" | sed "s#$T#TMP#g")
echo "throwaway sshd: $SSHD_VER; external address of this host: $EXTIP"
echo "direct access to the internal service from this host: $(curl -s -m 3 http://127.0.0.1:$WP/)"
echo "internal service reachable via external address $EXTIP:$WP: $(curl -s -m 3 "http://$EXTIP:$WP/" || echo no)"

for r in 1 2 3; do
echo "=== run $r ==="

echo "[1] default bind address (ssh -N -L $FP:$tgt):"
fwd a -N -L $FP:$tgt && echo "  listening on: $(listen)"
get 127.0.0.1; get "$EXTIP"; stopfwd
echo "  with -L localhost:$FP:...:"; fwd a -N -L localhost:$FP:$tgt && echo "    listening on: $(listen)"; stopfwd

echo "[2] making it listen on all interfaces:"
for spec in "0.0.0.0:$FP:$tgt" "*:$FP:$tgt"; do
  echo "  -L $spec"; fwd a -N -L "$spec" && echo "    listening on: $(listen)"; get "$EXTIP"; stopfwd
done
echo "  -g -L $FP:$tgt"; fwd a -N -g -L $FP:$tgt && echo "    listening on: $(listen)"; get "$EXTIP"; stopfwd
echo "  -o GatewayPorts=yes -L $FP:$tgt"; fwd a -N -o GatewayPorts=yes -L $FP:$tgt && echo "    listening on: $(listen)"; stopfwd
echo "  server side GatewayPorts yes in sshd_config, client plain -L $FP:$tgt:"
startsshd $'AllowTcpForwarding yes\nGatewayPorts yes'; fwd a -N -L $FP:$tgt && echo "    listening on: $(listen)"; stopfwd
startsshd "AllowTcpForwarding yes"

echo "[3] who can use the forwarded port (no key, no ssh, only a TCP client):"
fwd a -N -L $FP:$tgt
echo "  process using the key: ssh pid owned by uid $(ps -o uid= -p $FPID | tr -d ' ')"
echo "  plain curl without any credentials:"; get 127.0.0.1
if sudo -n true 2>/dev/null; then
  echo "  curl run as another local user (sudo -u nobody, uid $(sudo -n -u nobody id -u)), no key, no ssh:"
  o=$(sudo -n -u nobody curl -s -m 3 "http://127.0.0.1:$FP/" 2>&1); echo "    exit=$? body=${o:-(empty)}"
fi
echo "  python socket from a different process, raw HTTP request:"
echo "    $(python3 - <<PY
import socket
s=socket.create_connection(("127.0.0.1",$FP),timeout=3)
s.sendall(b"GET / HTTP/1.0\r\n\r\n"); b=b""
while True:
    c=s.recv(4096)
    if not c: break
    b+=c
d=b.decode().split("\r\n\r\n")[1].strip()
print("reply body:",d)
PY
)"
echo "  listener owner (ss -ltnp):"; ss -ltnp "sport = :$FP" 2>/dev/null | awk 'NR>1{print "    "$4, $NF}' | sed 's/pid=[0-9]*/pid=N/'
stopfwd

echo "[4] port already in use (another process holds 127.0.0.1:$FP):"
python3 -m http.server $FP --bind 127.0.0.1 --directory "$T/www2" >/dev/null 2>&1 & BLK=$!; PIDS+=($BLK); sleep 0.5
echo "  -f -N -L $FP:... (default bind: 127.0.0.1 and ::1), without ExitOnForwardFailure:"
sshx -f -N -L $FP:$tgt >"$T/u.out" 2>"$T/u.err"; echo "    ssh exit=$?"; sed 's/^/    > /' "$T/u.err"
echo "    ssh still running afterwards: $(pgrep -u "$(id -u)" -f "$T/userkey" | wc -l) process(es); listening: $(listen)"; killall_ssh
echo "  same with -o ExitOnForwardFailure=yes:"
sshx -o ExitOnForwardFailure=yes -f -N -L $FP:$tgt >"$T/u.out" 2>"$T/u.err"; echo "    ssh exit=$?"; sed 's/^/    > /' "$T/u.err"
echo "    ssh still running afterwards: $(pgrep -u "$(id -u)" -f "$T/userkey" | wc -l) process(es); listening: $(listen)"; killall_ssh
echo "  -L 127.0.0.1:$FP:... (only the busy address), -f, without ExitOnForwardFailure:"
sshx -f -N -L 127.0.0.1:$FP:$tgt >"$T/u.out" 2>"$T/u.err"; echo "    ssh exit=$?"; sed 's/^/    > /' "$T/u.err"
echo "    ssh still running afterwards: $(pgrep -u "$(id -u)" -f "$T/userkey" | wc -l) process(es)"; killall_ssh
echo "  -L 127.0.0.1:$FP:... with -o ExitOnForwardFailure=yes, -f:"
sshx -o ExitOnForwardFailure=yes -f -N -L 127.0.0.1:$FP:$tgt >"$T/u.out" 2>"$T/u.err"; echo "    ssh exit=$?"; sed 's/^/    > /' "$T/u.err"
echo "    ssh still running afterwards: $(pgrep -u "$(id -u)" -f "$T/userkey" | wc -l) process(es)"; killall_ssh
echo "  -L 127.0.0.1:$FP:... without -f, without ExitOnForwardFailure, timeout 2 s:"
tsshx 2 -N -L 127.0.0.1:$FP:$tgt 2>"$T/u.err"; echo "    exit=$? (124 = still running when timeout killed it)"; sed 's/^/    > /' "$T/u.err"
echo "  -L 127.0.0.1:$FP:... without -f, with ExitOnForwardFailure=yes, timeout 2 s:"
tsshx 2 -o ExitOnForwardFailure=yes -N -L 127.0.0.1:$FP:$tgt 2>"$T/u.err"; echo "    exit=$?"; sed 's/^/    > /' "$T/u.err"
echo "  what answers on 127.0.0.1:$FP while the forward failed: $(curl -s -m 3 http://127.0.0.1:$FP/) (the blocker's own directory, not the tunnel)"
kill $BLK; wait $BLK 2>/dev/null; sleep 0.3

echo "[5] -N versus a command:"
echo "  ssh -L ... true (a command, no -N):"
sshx -L $FP:$tgt -- true; echo "    exit=$?; port listening after it returned: $(listen)"
echo "  ssh -L ... sleep 2, curl during the sleep:"
( sshx -L $FP:$tgt -- sleep 2 & sleep 1; get 127.0.0.1; wait )
echo "  ssh -N -L ... (no remote command), timeout 2 s:"
tsshx 2 -N -L $FP:$tgt; echo "    exit=$?"
echo "  ssh -N with a command appended (true):"
tsshx 3 -N -L $FP:$tgt -- true; echo "    exit=$? (the command is ignored if 124)"

echo "[6] AllowTcpForwarding in sshd_config:"
for v in yes local remote no; do
  startsshd "AllowTcpForwarding $v"
  echo "  sshd_config: $(grep '^AllowTcpForwarding' "$T/sshd_config")"
  fwd a -o LogLevel=INFO -o ExitOnForwardFailure=yes -N -L $FP:$tgt; echo "    ssh still running: $(kill -0 $FPID 2>/dev/null && echo yes || echo no); local port listening: $(listen)"
  get 127.0.0.1; sleep 0.3; sed 's/^/    ssh stderr> /' "$T/a.err"; grep -i "refused\|administratively\|permitopen\|denied" "$T/sshd.log" | sed 's/^[^ ]* [^ ]* sshd\[[0-9]*\]: //;s/\(originator\|from\) 127.0.0.1 port [0-9]*/\1 127.0.0.1 port N/' | sort -u | sed 's/^/    sshd log> /'; : > "$T/sshd.log"; : > "$T/a.err"; stopfwd
done
startsshd $'AllowTcpForwarding yes\nMatch User '"$(id -un)"$'\n  AllowTcpForwarding no'
echo "  yes globally, Match User $(id -un) -> no:"
fwd a -o LogLevel=INFO -N -L $FP:$tgt; get 127.0.0.1; sleep 0.3; sed 's/^/    ssh stderr> /' "$T/a.err"; grep -i "refused\|administratively\|permitopen\|denied" "$T/sshd.log" | sed 's/^[^ ]* [^ ]* sshd\[[0-9]*\]: //;s/\(originator\|from\) 127.0.0.1 port [0-9]*/\1 127.0.0.1 port N/' | sort -u | sed 's/^/    sshd log> /'; : > "$T/sshd.log"; stopfwd
startsshd "AllowTcpForwarding yes"
echo "  options on the key: restrict,port-forwarding,permitopen=\"127.0.0.1:9\":"
echo "restrict,port-forwarding,permitopen=\"127.0.0.1:9\" $(cat "$T/userkey.pub")" > "$T/authorized_keys"
fwd a -o LogLevel=INFO -N -L $FP:$tgt; get 127.0.0.1; sleep 0.3; sed 's/^/    ssh stderr> /' "$T/a.err"; grep -i "refused\|administratively\|permitopen\|denied" "$T/sshd.log" | sed 's/^[^ ]* [^ ]* sshd\[[0-9]*\]: //;s/\(originator\|from\) 127.0.0.1 port [0-9]*/\1 127.0.0.1 port N/' | sort -u | sed 's/^/    sshd log> /'; : > "$T/sshd.log"; stopfwd
cp "$T/userkey.pub" "$T/authorized_keys"
done

Este artículo no contiene enlaces de afiliado.