
Tengo SSH instalado en la computadora portátil de mi casa y funciona bien. Configuré el túnel:
$ ssh -p 443 -C2TNv -D 8080 [email protected]
Configuración de Firefox:
manual config:
SOCKS; port 8080
V5
about:config:
network.proxy.socks_remote_dns: true
Salida terminal:
OpenSSH_5.9p1, OpenSSL 0.9.8t 18 Jan 2012
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to me.no-ip.org [] port 443.
debug1: Connection established.
debug1: identity file /home/me/.ssh/id_rsa type -1
debug1: identity file /home/me/.ssh/id_rsa-cert type -1
debug1: identity file /home/me/.ssh/id_dsa type -1
debug1: identity file /home/me/.ssh/id_dsa-cert type -1
debug1: identity file /home/me/.ssh/id_ecdsa type -1
debug1: identity file /home/me/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 [email protected]
debug1: kex: client->server aes128-ctr hmac-md5 [email protected]
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: <removed>
debug1: Host '[me.no-ip.org]:443' is known and matches the host key.
debug1: Found key in /home/me/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/me/.ssh/id_rsa
debug1: Trying private key: /home/me/.ssh/id_dsa
debug1: Trying private key: /home/me/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
[email protected]'s password:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
Authenticated to me.no-ip.org ([removed]:443).
debug1: Local connections to LOCALHOST:8080 forwarded to remote address socks:0
debug1: Local forwarding listening on ::1 port 8080.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8080.
debug1: channel 1: new [port listener]
debug1: Requesting [email protected]
debug1: Entering interactive session.
Luego, al visitar cualquier sitio web, aparece: "El servidor proxy no acepta conexiones".
Por favor avise.
Respuesta1
Tuve que cambiar la configuración del túnel desde Putty. Tuve que revisar las burbujas Dinámica e IPv4; Funciona bien ahora.
Respuesta2
Necesita ejecutarse sshd
en el extremo remoto y debe conectarse a él, no al servidor web.
$ ssh -C2TNv -D8080 [email protected]
El navegador especifica el host y el puerto reales al que conectarse como parte de cada solicitud SOCKS.
Cuando configuras un túnel SOCKS con ssh -D
, esto es lo que sucede:
- su aplicación (el navegador en este caso) se conecta al puerto de calcetines local que ha designado.
- el programa ssh que se ejecuta localmente actúa como servidor SOCKS y obtiene el host y el puerto solicitados del navegador.
- el local
ssh
solicita al control remotosshd
, que se ejecuta en el host que usted especificó (me.no-ip.org
en su caso), que abra una conexión al host y al puerto solicitados. - el local
ssh
y el remotosshd
configuran un túnel entre ellos para reenviar el tráfico entre la conexión local realizada por el navegador y la conexión remota realizada por el archivosshd
. Este es el túnel.