Mar 26, 2008

LINUX : SSH Tunneling from Windows SSH Server

I've successfully setup Openssh server on my Office Windows XP for tunneling reason. hehe. I need a tunneling box so that I could gain full access to the internet without any block ports when I get back to my schools.

Here is how to setup Openssh on Windows Box:
  • Download CGYwin from here. Make a new directory on C:\cgywin and paste the setup.exe which you just download from cgywin.
  • Run the setup and choose mirror. When the setup ask for either make cgywin available to all user or just you, then you have to choose "Available to all user". and follow the steps.
  • When it ask for a local package directory, point it to C:\cgywin
  • On the packages selection, please make sure you select Openssh package to be installed, if not then there is no point setting up everything but openssh isnt installed.
  • After finished installing the openssh, we need to set up several things before we can use the console and ssh:
    • setup password for current user(make sure user has admin privilege).
    • Open My Computer properties, go to Advanced tabs and click on the Environment Variables icon.
    • on System Variables, click Edit and insert the value as given:
      • Variable = CGYWIN | Value = ntsec tty
      • Variable = path | Value = (add to the end of line) ";C:\cgywin\bin" without quote.
    • And done.. Now logout and login again to the user, make sure the password is active. If it's not active, then maybe you need to restart the Windows.
  • Now we need to link user from windows to cgywin so that user can login through ssh.
    • open up cgywin console by double click the icon on windows desktop.
    • once open, we need to install the sshd.
      we can install the ssh by using this command "ssh-host-config -y"
    • and when prompt for "environment variable CGYWIN"= you should answer "ntsec tty"
    • now start the ssh by typing "net start sshd" or "cygrunsrv --start sshd"
    • still on the cgywin console, type:
      • mkpasswd -cl > /etc/passwd
      • mkgroup --local > /etc/group
And now we are finished. Now you Open terminal on your linux laptop/pc adn type the command:
  • ssh -D 9999 -C @ and enter password you set for the user. walla.. set your internet browser to use the ssh tunneling as proxy then you are good to go.

Thank you for your unbelievable support on Negative Zero - Permission to read and write blog for nearly 4 years. Don't forget to like Negative Zero on Facebook. Blog Directory

Post(s) you might like to read :

1 comment:

  1. hehe.sonok btol aku layan ssh tunneling kat windows ko nih..
    thx tau ^^