Accessing Sybase from outside the lab

REQUIREMENTS:

  1. Interactive SQL (ISQL) installed in your home machine (download here - size: 120MB).
  2. Internet connection (Cable, Dial-up or ADSL)
  3. SyBase account (use the account given to you for your lab session)

STEP 1: Connecting to NUS
(
If you are in campus, move to step 2)

If you're using cable, ADSL etc and already have SingTel or SCV or other IP addresses, you'll need to run NUS-VPN. Running NUS-VPN will give you a NUS IP Address. You can find NUS-VPN here http://www.nus.edu.sg/vpn/

STEP 2: SSH Tunneling
If you have a NUS IP address, you can ssh into sf3.comp.nus.edu.sg (SoC UNIX server). The SSH server at sf3.comp.nus.edu.sg will act as the middleman, forwarding request from your computer to the SyBase server.

To download SSH Secure Client, go to http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html. Refer to this page https://noc.comp.nus.edu.sg/docs/sshtunnel.html  for more info on SSH tunneling. To setup the ssh tunnel to sundbl, follow the following steps:

  1. Click Edit, Settings
  2. Under Profile settings, click Tunneling
  3. You will see two tabs (Outgoing, Incoming). Select the Outgoing table.
  4. Click Add (A popup box will appear)
  5. Enter the settings as follows:

    Display Name: sundbl
    Type: TCP
    Listen Port: 2638
    Allow Local Connections Only: Leave checkbox checked
    Destination Host: sundbl.comp.nus.edu.sg
    Destination Port: 2638

We will make use of sf3.comp.nus.edu.sg to connect to SyBase.

After you setup the ssh tunnel, use it to connect to sf3.comp.nus.edu.sg (use your SOC account) and leave it alone - don't close SSH.

STEP 3: Setting up ISQL

Next, we need to setup ISQL to connect to this running tunnel we created (connect to the SSH Client runing on your computer)

Run ISQL. Under the "Advanced" Tab, use these settings:

commlinks=tcpip{host=localhost}
eng=course

If you are on campus, and the above do not work, you can try

commlinks=tcpip{host=localhost;UseUDP=No}
eng=course

Now, type in your Sybase userid and passwd as usual to connect to the SyBase database.If you have setup everything correctly, you'll be connected to the Sybase via a SSH tunnel.