Category: Instructions

SSH to Student Server

11.09.2018 - 12:58

For connecting to Student server you can use what ever SSH client, for example PuTTY.

First enter the address to Student server which is student.labranet.jamk.fi (see figure 1).

Figure 1. PuTTY startup screen

Then PuTTY asks login ID and password. Use your LabraNet account’s ID and password (see figure 2). Capitalize the first letter of your student id when logging to student via SSH.

Figure 2. PuTTY login screen

After successful login you are in Student server (see figure 3).

Figure 3. PuTTY logged in to Student server

SFTP connection to Student server

LabraNet users can use WinSCP SFTP client to remote access their LabraNet home folder. The WinSCP client can freely downloaded from http://winscp.net/

Download and install the client. Choose Start -> Programs -> WinSCP -> WinSCP

Once the program starts you need to enter the address to Student server which is student.labranet.jamk.fi.

After that you need to enter your LabraNet UserID and password. Port number is 22 (see figure 4).

Figure 4. WinSCP startup

Your local files are in the left window of the client and the remote files (your home folder on Student server) are in the right (see figure 5).

Figure 5. WinSCP connected to Student server

You can transfer files by dragging them from window to another.


Services on Student server

11.09.2018 - 12:57

What is student.labranet.jamk.fi server?

  • Server that is dedicated only for ICT-students.
  • Virtualized
    • 4GB of memory
    • Diskspace quota is set (500MB for every ICT-student)
  • Running Linux environment (CentOS 8) with LAMP (Linux, Apache, MariaDB, PHP)
  • Administered by Labranet’s administrators

What it isn’t

  • No screen processes
  • No IRC-connections
  • No IRSSI, Bitch-x, etc
  • No IRC-bots (eg. eggdrop, energymech)
  • No illegal material (storing illegal material will cause you to lose your account, see policy)

What does student server offer for you?

  • Anything you can do in UNIX/Linux environment
  • gcc/cc/java
  • WWW-space
  • PHP
  • SSH/SFTP Connections
  • Crontab
  • ETC (basically anything you can do in UNIX/Linux environment, feel free to ask if you need something)

How you can access student.labranet.jamk.fi?

See the SSH to Student Server – instructions.


Requesting Virtual Machines

11.09.2018 - 12:56

LabraNet provides virtual machine hosting, such as development or production servers for different projects. Project servers can be used internally as a project environment, software development, etc. and can be used from local workstations or through LabraNet VPN. For customer-related projects we can offer external hosting with public internet access also, but as we have limited number of public IPv4 addresses, we can currently issue only a handful of publicly visible servers. There must be a real reason for public server use, if the virtual machine is to be used primarily by students and staff it will be internal server only.

When requesting a virtual server, please use our Helpdesk to create a ticket, and fill the following information:

    • Name of the server (hostname.labranet.jamk.fi)
    • Required operating system

Primarily supported operating systems: Rocky Linux 8 & 9, Ubuntu Server (22.04), Windows Server 2019, Windows 10 & 11. Other OS can be requested but a good reason must be provided.

    • Short description of usage and the course or project involved
    • A contact person who will receive the administrative account for the virtual machine (Will be the creator of the ticket if not provided)
    • How long will the server be in use (Exact date!)

We will contact people when the use date is exceeded about whether the vm is still needed or not. Long-term usage must be discussed with administration on case by case basis.

  • Will the server need to be used from the internet and why?

After the VM is created, the appointed administrative person will be responsible for updates and other security of the server. If a default password is provided, it must be immediately changed to more secure one. All LabraNet Usage Policy rules apply to virtual machines also. LabraNet administration reserve the right to access and manage the virtual machine if rules are broken and also in case of severe problems that may affect the security or functionality of other systems.

By default, access to vms will be restricted to most used protocols only (http, https). Management is handled by SSH or RDP and only from local network. Other protocols/applications can be requested when needed.


Remote home-folder

11.09.2018 - 12:55

Your home-folder can be accessed from outside by using VPN connection. Accessing via SSH tunnel is not supported anymore. Connect to LabraNet by VPN and type the following (Windows).
win+r or Start – Run
The path to your LabraNet home folder is:
\\storage.labranet.jamk.fi\homes\userid
When you are asked for credentials, enter your username as userid@labranet.jamk.fi (for example, c5431@labranet.jamk.fi) and use your LabraNet account password.
You can also use Windows tools to permanently map your home-folder as a network drive. Please note that the mapped drive will be accessible only when the VPN connection is active.

It is also possible to mount your Student-server home folder with the following path, credentials are the same as above:
\\student.labranet.jamk.fi\userid

Note! Mac OS Sierra users might have issues connecting to Student-server via SMB and CIFS. As a workaround, LabraNet administration recommends using Fuse for macOS and SSHFS both available here.
These enable you to mount your Student-server home folder via SSH with the command:
sshfs -o option1,option2 userid@student.labranet.jamk.fi:/home/userid /mountpoint

Additional note! After the rebase to Centos 8, some older clients may no longer be able to connect. Remember that you can always use an SFTP client like WinSCP to access your Student-server home folder, and that it also works over the public internet, not just over VPN.


public_html and PHP

11.09.2018 - 12:54

Note! LabraNet usename corresponds to userid with your LabraNet username when running the commands below.

Every LabraNet user has public_html folder under their home folder.

To publish websites, first you have to modify some rights of your homefolder.

[userid@student userid]$ chmod 701 ~

This command gives only the execute permission to others.

[userid@student userid]$ chmod 705 ~/public_html

Note! Remember to apply permissions recursively if you have a nested folder structure under your public_html folder.

[userid@student userid]$ chmod -R 705 ~/public_html

With the above commands you allow others to read and execute your public_html folder.

[userid@student userid]$ touch ~/public_html/index.html

Note! Unless run chmod recursively, permissions do not apply to .htaccess. This file needs to be readable. To fix this, allow read permission to others.

[userid@student userid]$ chmod 604 ~/public_html/.htaccess

Now you should see an empty page @ http://student.labranet.jamk.fi/~userid

For PHP functionality check instructions in .htaccess -file under public_html. More information can be found in instructions-directory in your home folder.

500 Internal Server Error

1. Check that your scripts syntax is right. Run “php -l my_script.php” on command line (where my_script is your php file).

2. Check that your public_html folder has correct permissions (see above).

3. SELinux context might be wrong. Restore the SELinux context by issuing command:

chcon -R -v -t httpd_user_content_t ~/public_html/*