networking - How To Chain SSH Tunnels -
i trying set simple ssh tunnels chain. i have following machines: local machine, @ 10.0.0.1. remote machine, @ 10.0.0.2. i have following programs: client.py: import socket client_host = [...] client_port = [...] sock = socket.socket(socket.af_inet, socket.sock_stream) sock.setsockopt(socket.sol_socket, socket.so_reuseaddr, 1) sock.connect((client_host, client_port)) sock.send('test') sock.close() server.py: import socket server_host = [...] server_port = [...] server = socket.socket(socket.af_inet, socket.sock_stream) server.setsockopt(socket.sol_socket, socket.so_reuseaddr, 1) server.bind((server_host, server_port)) server.listen(1) client = server.accept()[0] print client.recv(1024) client.close() server.close() now: i run client.py (client_host='127.0.0.1', client_port=8000) , server.py (server_host='', server_port=8000) on same machine, , works expected. i run client.py (client_host='127.0.0.1', client_port=8000) on l...