ssh tunnel on linux mechine

-- pertama --

base on tunneling on my previous post ( if you wanna see it)

-- next --
in my case, how to tunnel ssh connection is a must. ans this is the story..

-- basically --
all you need to know is the right formula. n the formula is


ssh -L localport:host:hostport user@ssh_server 

-- on check n jajal --

ssh -L 1122:1.2.3.4:22 user@brekele.inc 

the explanation is we make local port 1121. it redirect our connection to 1.2.3.4 on port 22 ( how simple it is)

--other option --
you can put -L more than one. maybe you wanna make tunnel to vnc port or another else


ssh -L 1122:1.2.3.4:22 -L 1123:1.2.3.4:5901 user@brekele.inc

source : www.linuxhorizon.ro
Previous
Next Post »

2 comments

Click here for comments
July 15, 2010 at 9:28 AM ×

hmm... using that method, could we prevent ssh downgrade attack from an mitm?

Reply
avatar
darKonsole
admin
July 15, 2010 at 10:00 AM ×

Actually SSH Port Forwarding & SSH Tunneling is a way to continue the connection to a port that is not normally encrypted via tunneling. This method is commonly used for many service ports that are not encrypted, for example: databases, http, svn, and other services on a system / computer.
and to secure from attack, that's not enough with just one way. So keep watch

Reply
avatar

comment please ... ConversionConversion EmoticonEmoticon

Thanks for your comment