Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running a Minecraft server, and many of my users are on a college campus whose network doesn't play nicely with Minecraft. I'm looking to package together a dead-simple way of creating a SSH tunnel to the server. Ideally, they would just double-click something to set it up. I'm prepared to do significantly more work on my end, if need be.

If there isn't anything simpler, I can just tell them to use PuTTY, but I'm afraid I might scare some of them away.

share|improve this question
1  
There is no policy forbidding connecting to Minecraft servers from this campus. As far as I know, the connection problems are a side effect of their overzealous anti-torrent measures. –  Thom Smith Oct 5 '12 at 20:25
    
Not sure why this is being voted to close as off-topic, as you're not asking for a pre-made product. Seems valid to me, a lack of research effort shown though. :/ –  Ƭᴇcʜιᴇ007 Oct 6 '12 at 15:31
    
The close vote was due to the question ostensibly violating the campus network's terms of use. The relevant comment has since been removed. –  Thom Smith Oct 6 '12 at 15:59
    
Ahhhhhh.. That makes sense. :) –  Ƭᴇcʜιᴇ007 Oct 6 '12 at 16:06

1 Answer 1

up vote 4 down vote accepted

Bundle PuTTY's plink.exe and a batch script that sets up the tunnel:

@plink -v -N -D 1234 user@host

Replace -D 1234 with your desired tunnel options (-D, -L, -R; syntax same as in OpenSSH). (According to comments, you need -L 25565:localhost:25565.)


To avoid users having to answer the SSH key verification prompt:

  1. export PuTTY's cached key to a .reg file:

    reg export HKCU\Software\SimonTatham\PuTTY\SshHostKeys hostkey.reg
    
  2. open hostkey.reg in Notepad;

  3. in the file, delete all other host keys except your Minecraft tunnel host;

  4. add @reg import hostkey.reg as the first line of your batch script.

share|improve this answer
    
So, a .bat file in plink.exe's directory containing @plink -v -N -D 25565 miner@example.com to connect localhost:25565 to example.com:25526? –  Thom Smith Oct 5 '12 at 20:21
2  
-D is short for DynamicForward, also knows as a SOCKS Proxy, so you'd have to set up Minecraft to use a SOCKS proxy pointing to port 1234. Like @grawity said, use a different tunnel option. I'm assuming THEY will run the putty session (plink) so swap the '-D 1234' with this: -L1234:localhost:1234 This will allow the client to connect to their own PC on port 1234, the tunnel will transfer the connection to the server and shove the data to localhost:1234 (from the point of view of the server, so itself). Replace Mincraft's ports with 1234. –  UtahJarhead Oct 5 '12 at 20:28
1  
The above comment assumes that the minecraft server is running on your ssh server. Otherwise, instead of 'localhost', use the IP of the Minecraft server. –  UtahJarhead Oct 5 '12 at 20:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.