Writing Python Programs on a FreeBSD server

Connect to the server from a Windows PC

  1. Start the PuTTY program.
  2. Type "STU.ipv6.club.tw" as the Host Name, change the port number to 2018, and click Open.
    PuTTY Sessions
  3. If this is the first time you connect to this server, it will pop up a security alert window as follow. Verify the fingerprint is 58:0e:67:ae:10:55:bc:0b:da:c8:61:cd:c3:77:d3:de and click Yes to accept.
  4. Type your username, press Enter.
  5. Type your password, press Enter.
    Please notice that your password will not be shown on the screen while you are typing.
  6. You will see a welcome message, and the last line is "1 STU:~>". This is the prompt of the server, which implies that it is ready to get commands from you.

Connect to the server from MAC OS X

Acknowledgment: The following tips are provided with the courtesy of Jaslin Tan Shi Yee.
  1. First go to Terminal (you can find it in Launchpad>Other) , and type the command "ssh -p 2018 s1053210xx@STU.ipv6.club.tw".
  2. If this is the first time which you connect to STU from this MacBook, it will ask you to confirm. Please type "yes" and press Enter. (Don't simply type "y".)
  3. Then, the same as Windows PuTTY, type your password (which will not be shown on the screen), and you will successfully log into the server. Now you are ready to start writing programs on the server.

Edit a C program

  1. Type the name of an editor ("nano" or "vi"), and the filename you want to edit.
  2. Press Ctrl-X to exit the editor and save the program file.

Compile your source program to an executable file

  1. Invoke the Clang C++ compiler
  2. Run the executable file
    1. Simply type the filename to run it.
      • a.out
      • ex2_00.exe
    2. Unix does not require an executable file to have a special extension name (.EXE), so be careful when you name it.
    3. You may type the command "ls" to list all files under current working directory.
    4. Try to type the command "ls -F". With the option "-F", you can see that executable files are designated with a tailing star (*).

If your location is outside the campus ...

  1. Solution 1: Enable IPv6 on your PC.
  2. Solution 2: Use the TWAREN SSL/VPN service to access "site-local" servers.