EG Information

Main Index
EG Manual
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff
Hacker's Home Page
IRC Flash Chat

Training Missions

Read Me First
Basic Skills
Realistic Scenarios
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Captcha Cracking
Deface This Wall

Knowledge Bank

Discussion Forums
Exploit Database
Articles / Tutorials
Online EG MP3 Player Radio

Code Resources

Submit Code

Pimp Us Out!

Review on

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.

Enigma Group

Enigma Group

Enigma Group

Enigma Group

Enigma Group's Articles

Return to Category Selection

Setting up a reverse SSH tunnel - Submitted By: Ausome1 2008-08-19 10:54:53
Learn to forward a port on a remote machine to a local machine while initiating the SSH tunnel from the local machine.

SSH is an extremely useful tool in that it allows you to do many things in a secure fashion that you might not otherwise be able to do. One of the things SSH allows you to do is to set up a reverse encrypted tunnel for data transfer. Typically, when you initiate an SSH tunnel, you forward a port on the local machine to a remote machine which can allow you to connect to an insecure service in a secure way, such as POP3 or IMAP. However, you can also do the reverse. You can forward a port on the remote machine to the local machine while still initiating the tunnel from the local machine.

This is useful if you have a service on the remote end that you want to have connected to something on the local machine, but you don't wish to open up your firewall or have SSH private keys stored on the remote machine. By using a reverse tunnel, you maintain all of the control on the local machine. An example usage for this would be for logging messages; by setting up a reverse SSH tunnel, you can have a logger on the remote system send logs to the local system (i.e., syslog-ng).

To set up the reverse tunnel, use:

$ ssh -nNT -R

What this does is initiate a connection to and forwards TCP port 1100 on to TCP port 1100 on The "-n" option tells ssh to associate standard input with /dev/null, "-N" tells ssh to just set up the tunnel and not to prepare a command stream, and "-T" tells ssh not to allocate a pseudo-tty on the remote system. These options are useful because all that is desired is the tunnel and no actual commands will be sent through the tunnel, unlike a normal SSH login session. The "-R" option tells ssh to set up the tunnel as a reverse tunnel.

Now, if anything connects to port 1100 on the remote system, it will be transparently forwarded to port 1100 on the local system.

Return to Category Selection
If you wish to submit a comment, you must be a registered member and logged in.

Login or Register.

Return to Category Selection


Who Visited EnigmaGroup Today?

1928 Guests, 238 Users (88 Spiders)
21616, t1m3x, Alligamanor, morol, kikoWicked, manitou, satan_claus, agaen, dark_void, l8nit3tr0ubl3, tzanany, Requ21, theRaven, Gala0111, pollolololo, Super76, tommey123456, _triforce, schusterkenny17, marko0202, dcesser, quasimodo, marcusg, monster1, 0xpr0gr1010mm1110r8, Evil1, exphoenecian, ImPatra, Zylinx™, NeverFear, Marius, nuxglwk, BaryonicBeing, 2laXt3rmn8r, sofiane85, nallnaom, luci fer, zacklamsiah, Rex_Mundi, quersumme5, sysiler, dictator, Nightraven, notagenericname, JoMedics, xfight4, zacha1211, nucleardev, Gregsen, kungfuhrer, ForeskinSkywalker, rafaelinio2, Enigma1971, Ju5t4n3rdLab, Rodrynator, Hive, taskmaster17, BinaryShinigami, Theshadow, AlphaM4, MrNapol, DarkOutlier, mdomin45, york8, meghanvw, GUEZT, Arno Nym, Darwin_, TheRev, savinas, MargyPargy, 0o0nemo, Ryurem, BlackSmileNr1, philipp_lukas, psychomarine, 514lunch, Annumbo, Äsy, Hans Yolo, Bass2801, meyerm, Mayanhunter007, whitecoal, appy, Ablont, theshady, domnomercy, dieselmaxxx, Dr_McQuack, mrlordiz, kingjongun1, joker casio, York20, b1nary, albusseverus, pogofish, DonMafioso, ktsukino, coyote86, Angriper, Juncker87, conhead, joor, Biolaxy, Karma, pikachu7, ncap, Angeloo, LuckOfEvil, sekisback, Geilkeid, thetrh51, Blackhater, TwoPlay, rahul4686, Passepartout, higgsy fenton, bleh_2246, InsertNameHerex, bl4ck_sh4dow, ericson949, LenoxTheWusky, DerGiftgnom, caos2k, ChriZzn, syj4434, Helaro, w1nt3rf4ll, malkav, cesarakarc, Pseudonym, Ritzzz1qaz, herrregenfisch, hiepdv, FR13ND, ms_4321, hoppla1232_2, jbmollehacking, statix, Firnien, blink_212, Vhkgjvjg, spookyfication, bjm12149, Snoocer, jyddan, arashi256, zombi_666, N3enix1135, bibok, ci9her, schwabaer, archangel4, Serapis, alexus37, Void_Nemesis_GOF2, antinator7180, catsandgods, Rialli, notecu, rick/grimes, a4arghhh, Arguen, Anonson, poki4125, 5yn4x, drescherlena, Jaschke, Kamuriendon, L.Rivermoon, nick20, AdamJ, gkg98, SciFi, Mr Robot, hashemnik, vadupdawg, nicibe, coolmenoob, Teddy, p2501, Chit Sone, dylldoe, akai, zalpha, Codex155, LondonEscorts, dokhyi, Technomixx, victor, rvemula, Shaco, tonyhej, cor3dump, sassasowicz, j4cked, mongrel88, claydugo, orchas, Revolutsioner, Anonanonamous, ellisp, Opticity, snfldyrim, kitios, htang555, TreibholzDub, McSwine, psyko00, deep3, Snow, KatsuWolf, Spikeroche, cyph, Sixhundred sixty six, denialofsense, sharaab, DrJava, DarkXx, frogpla, dragon1393, Psiber_Syn, honchay, dibemdere, mfathy, libraAestus, medium_rare_pepe, zylex_, illusionz, illusionzzz, illusionzz, Chissa, TheForsaken, TheSir, shaymime, 0racle0utKast, wisdominspades
Enigma Group