
December 4th, 2012, 10:59 PM
|
 |
C Neophyte.
|
|
Join Date: Feb 2004
Location: Melbourne Australia
|
|
|
TCP port forwarding using SSH
I did a quick forum search but couldn't find an answer to this one
How do I enable port forwarding using SSH?
I have three devices
1- Desktop Computer
2- Server B (named bems)
3- Router C
I want to be able to ssh from computer to Router C , through Server B; hence I need to set up port forwarding on Server B
(see attached image file)
I have tried this but this does not work:
unix Code:
Original
- unix Code |
|
|
|
server-b# ssh -L 2221:203.44.175.197:22 localhost
... I keep getting "Fatal error, connection refused"
Aside - Socat
I have socat partially working and ssh is forwarded,
but each time I run my script that automates SSH, it crashes...
unix Code:
Original
- unix Code |
|
|
|
server-b# /opt/csw/bin/socat -ddd -v -ls -s -4 tcp-listen:2221 tcp-connect:203.44.175.197:22
__________________
For one to know everything, first one must accept he knows nothing.
|