Even though tunnelling using ssh is a well discussed topic in internet, I couldn't make my setup proper. This is what the problem statement I have
-> I have two servers A and B. -> I am trying to create a tunnel from A to B
-> In BI have echo server which is listening on port 34567
-> In AI have executed the command ssh -L 4444:10.106.251.90:34567 127.0.0.1
-> Netstat shows as follows
~ # netstat -na | grep 4444 tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN tcp 0 0 ::1:4444 :::* LISTEN -> In BI tried to check netstat -na | grep 4444
netstat -na | grep 4444
but there was no reference of it
-> In AI have echo client which writes into 127.0.0.1:4444
-> If I execute client in A, it doesn't forward. Instead it gives some 0 length string always
Is there any thing that I am missing here ?
Thanks ~S
Try using
ssh -L 4444:127.0.0.1:34567 user@10.106.251.90
This will open port 4444 on your local machine, forwarding packets to port 34567
of the remote machine.
# using on local
telnet 127.0.0.1 4444
# is the same as
# on remote
telnet 127.0.0.1 34567
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.