How to ssh tunnel in linux
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIXzoJJE6UuYaiwG9I7iku8RBoiT96JisMmDznLlcH2RGQzpccNchVufj0mI6qMx85DsKtjML2aQP_kx2LRFoKtbW7P24OyZS54L5yBiNNgRQmzeVfnB4YKXCPSUIBZ3RMfMF2LZQeOlYS/s320/ssh+tunnel.jpg)
How to ssh port forwarding ( ssh tunneling) in linux. For example, Client [localhost:10000] ---> Server 1 [port:1111]----->Server 2 [port:22] Server 1 ip address: 192.168.1.12 port: 1111 Server 2 ip address: 192.168.1.13 port: 22 From client, how to login ssh to Server2 via Server1. ssh -p 1111 -f [email protected] -L 10000:[email protected]:22 -N ssh -p 10000 root@localhost From client, how to copy files to Server2? scp -r -P 10000 /path/to/file root@localhost:/path/to/folder