If you plan to do the exercises on lifa (or molveno), you only need an internet connection and a terminal emulator with ssh capabilities. There is a terminal emulator for Windows—PuTTY—which should do just fine. MacOS and other *BSDs and Linux-based systems all have built-in terminal emulators.
Lifa runs Linux (as most servers do) so it is best, although not strictly necessary, to use a Linux system for this course, especially if you plan to do exercises on your own box. You can get a running Linux system in a multitude of ways, for example:
Install your favourite GNU/Linux system (for example, Ubuntu is a popular choice) on you laptop. It should take about half an hour (somewhat longer, perhaps, if your plan to shrink partitions).
Run Ubuntu from a 2G+ USB stick on any computer bootable from a USB drive (the computers in the excercise room are bootable from USB). All disk operations will be much slower than from a hard disk.
Run Ubuntu in a VirtualBox in your box. This is not supported officially, but it did work for many students. Expect some problems with internet bridging into your virtual box.
All your excersises and the project should be uploaded and built on lifa (or on molveno). You can either work directly on lifa over the internet—the default way—or you can work on your personal computer and then upload the exercises to lifa. But you still have to build them on lifa (or molveno).
Get yourself a username on "lifa.phys.au.dk", the IFA server.
You probably have one if you have an email account at IFA (an NFIT account). If your email is "pks05@phys.au.dk" you username on lifa is "pks05".
If not, go to NFIT help-desk (1525-415) and get yourself an NFIT account and NFIT password.
Login on you lifa account.
From the wired network at IFA (nfit.au.dk and phys.au.dk) you login
on lifa with your NFIT username and your NFIT password. (You can find
out your computer's network name using the command [nslookup
`hostname`] or [host `hostname`]).
From the outside world you login with a pair of RSA keys – a public key and a private key. They both are small pieces of ascii text. The private key should be kept on your private computer from which you login to lifa; the public key has to be added to the "authorized_keys" on lifa (as described below).
Another option to login from the outside world is VPN (here in English). It is not supported, but some students used it successfully.
If you are inside IFA—for example, your box is connected to IFA's wired network—login on lifa with your NFIT username and NFIT password using secure shell:
ssh your_username@lifa.phys.au.dk
where instead of "your_username" you have to type your actual NFIT
username. It might ask you whether you trust lifa – answer "yes"
without quotes. Then it will ask you for your password – type in
your NFIT password. If everything goes right, you are logged in on lifa.
On windows run PuTTY and specify "lifa.phys.au.dk" without quotes as the destination. Then login with your NFIT username and password. It might ask you whether you trust lifa – answer yes.
If you plan to login from outside IFA, you have to set up a pair of RSA keys – a private key and a public key. The public key has to be added to the authorized keys on lifa and the private key has to be kept privately on your private computer you will be loggin in from.
If you have already set up the keys, go to the next item.
Otherwise, the official instructions (also for PuTTY) are here in English and here in Danish. If you can't read them, here are the unofficial instructions for a Linux system:
If you don't have a suitable pair of personal RSA keys, create them with ssh-keygen command on a linux system (you can also do it on lifa itself by loggin in from inside the firewall with NFIT username and password as described above) by issuing the following commands at the terminal
cd
ssh-keygen -t rsa
It will ask you for a passphrase which you have to make up and
remember – there is no way to restore the passphrase if you forget
it. The passphrase belongs to the key and has nothing to do with your
NFIT password. Do not use a blank passphrase!
If everything goes right, a private key, called "id_rsa", and a public key, called "id_rsa.pub" are generated in your .ssh directory.
The private key has to be kept in the .ssh directory of the computer you want to login from. The public key—which is simply a long line of ascii characters—has to be added to the file ".ssh/authorized_keys" on your lifa account.
If you have generated the keys on lifa itself and assuming you are connected to lifa from your private Linux box to be used to login from outside, do
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
This will add the public key to the authorized keys on lifa. Now logout
from lifa with the exit command and copy the private key to
your private computer using the secure copy command
scp your_username@lifa:/usr/users/your_username/.ssh/id_rsa ~/.ssh/
You can now login on lifa from outside IFA.
If you have generated the keys in the .ssh directory of your private Linux system, the private key is already where it has to be, and you only need to add the public key in the file "if_rsa.pub" to your "~/.ssh/authorized_keys" file on lifa. Copy the public key to a USB-drive or send it to yourself by email.
Using a computer with a terminal emulator from IFA (for example, your own box connected to wired IFA network):
cd
cd .ssh
nano authorized_keys
Using a computer with X-windows system inside IFA. You can get one by booting an Ubuntu live USB or live CD on one of the public computers. Or, connect your Ubuntu box to the wired network at IFA.
-X option -- you need that to run Firefox on lifa:
ssh -X your_username@lifa
firefox --no-remote &
In this Firefox, go to your email, get your attachment, and save it in
your Desktop directory (or any other directory at your wish
-- the important thing is to remember the name of the directory).
cd
cd .ssh
cat ~/Desktop/id_rsa.pub >> authorized_keys
If you saved the file in another directory, you have to use the name of
that directory, of course.
After the public key had been added to authorized keys on lifa, all computers with the corresponding private key in the .ssh directory can ssh into lifa as
ssh your_username@lifa.phys.au.dk
It will ask you for the pasphrase of the public key.
Once you have logged in on lifa try
ssh your_username@molveno
Molveno is the dedicated server for numerical methods. Your home
directory is the same as on lifa.
Molveno should have more recent software as compared to lifa and I can install extra software on molveno should you need some.
Prepare the directory for the exercises:
Create the directory for the exercises using the mkdir command:
mkdir -p ~/public_html/numeric
where ~/ is the abbreviation for you home
directory.
Now the URL http://www.phys.au.dk/~your_username
points to your ~/public_html/ directory, while
http://www.phys.au.dk/~your_username/numeric points to your
~/public_html/numeric directory which should then be the
place for your exercises.
Change the permissions to allow the others see
your ~/public_html directory,
chmod -R go+xr ~/public_html
You might need to issue this command again after you have created some
new files.
If you do not wish the others to see a certain file, for example
my_secret_file, do
chmod go-r my_secret_file
Try it out
Create a "test" sub-directory in your numeric directory
mkdir -p ~/public_html/numeric/test
and go there
cd ~/public_html/numeric/test
Hint: the tabulator-key on the left of the keyboard does "completion":
it tries to complete—in a smart way—the words you type.
You only need to type the (qualified) beginning of the name and then
pressing tabulator-key will complete the name for you.
Pick your favourite text editor. If you don't have one, try nano –
it is very simple. You only need to remember that, for example,
^X in the menu list at the bottom of the window means
pressing the Ctrl-key (usually bottom left) and the x-key (often between
z and c) together, with Ctrl-key first.
A very popular GUI text editor is gedit but you need a computer with an X-window system installed to run it (linux-based systems, like Ubuntu, usually have it installed by default). For example, you can boot the computers in the computer room off an Ubuntu Live CD or USB and work from that. In order to use X-window programs you have to login with "-X" option,
ssh -X user@host
create a file named test.c with the content
#include <stdio.h>
int main(void)
{
printf("hello\n");
return 0;
}
cc test.c -o test
or using make utility
make test
./test
the word "hello" must appear on the screen if everything goes right.
http://www.phys.au.dk/~your_username/numeric/test