-====== Working on remote computers with SSH ====== The [[http://en.wikipedia.org/wiki/Secure_Shell|Secure Shell]] network protocol allows you to connect to remote computers through a an encrypted channel. SSH is the standard tool used by computational scientists to interact with computer clusters and supercomputers around the world. During the four weeks of the tutorial, you have the possibility to access a remote computer (16-core Xeon E5-2690 CPU with 2.9 GHz clock frequency, 256 GB RAM). All exercises can be completed on the local Macintosh machines. Using the remote computer may allow you to speed up some calculations and to learn about how work on remote machines. Once you have a user name on the remote computer (ask your teaching assistant), you can connect to it: ssh -X studentXX@tcopt3.chem.uzh.ch # Connect to host tcopt3.chem.uzh.ch with X11 forwarding The ''-X'' flag ensures that when you run a program with a graphical user interface on the remote computer (such as VMD), the graphical user interface will be //forwarded// to your local machine. This should work on the Macintosh computers in the lab. If you want to use your own laptops, you might have to install some additional software and it is your responsibility to do so (we will of course help you, where we can). Linux * Connect to the internet via UZH VPN * Open X-Windows terminal Mac OSX * Install [[https://xquartz.macosforge.org/landing/|XQuartz]] (X11.app) * Connect to the internet via UZH VPN * Open terminal: hit ''CMD'' + ''SPACE'' to open the search window, enter 'terminal' and hit ''RETURN''. * ssh -X studentXX@tcopt3.chem.uzh.ch Windows * Install the [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|PuTTY]] SSH client * Install the [[http://sourceforge.net/projects/xming/|Xming]] X Server for Windows * Connect to the internet via UZH VPN * Configure PuTTY and Xming as described [[https://wiki.utdallas.edu/wiki/display/FAQ/X11+Forwarding+using+Xming+and+PuTTY|here]] **TASK 1** - Connect to tcopt3. This will be your working space for all exercises. - Change the default password to a personal one using command: passwd ====== File transfer ====== After connecting to the remote computer, you start in your personal //home// directory. Since you are connecting to the machine for the first time, this directory will be basically empty. Let's fill it with some useful data. A directory is provided on the home page as a [[http://www.gnu.org/software/tar/manual/html_node/index.html|tar archive]]. Download ''intro.tar'' to your local machine and unpack it: tar xf intro.tar For Windows you can use [[http://www.7-zip.org/download.html| 7zip archive manager]] if you don't have it Copy the ''intro'' directory from your local machine to the remote computer by using the [[http://en.wikipedia.org/wiki/Secure_copy|scp]] program: pwd # print your home directory exit # exit ssh connection scp -r intro studentXX@tcopt3.chem.uzh.ch:/path/to/home/directory # copy directory 'intro' to remote computer If your laptop runs Linux or MacOs, then ''scp'' will already be on it. Windows * Install [[http://winscp.net/eng/download.php|WinSCP]] * Configure WinSCP as described [[http://winscp.net/eng/docs/guide_connect|here]], selecting the SCP file protocol Later, you may want to copy back some data from the remote machine to your local computer for closer inspection. This works just analogously: scp -r studentXX@tcopt3.chem.uzh.ch . # copy directory from remote computer to the current directory on your local computer There is also a possibility to download the archive intro.tar directly to the tcopt3 server via the following command: wget http://cp2k.org/_media/exercises:2015_uzh_molsim:intro.tar mv exercises:2015_uzh_molsim:intro.tar intro.tar