User Tools

Site Tools


exercises:2017_uzh_cmest:login

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
exercises:2017_uzh_cmest:login [2017/09/20 07:30] – created tmuellerexercises:2017_uzh_cmest:login [2017/09/25 11:10] tmueller
Line 5: Line 5:
 ===== Part I: Login ===== ===== Part I: Login =====
  
-As mentioned in the lecture, you absolutely need+==== Required software ====
  
-  * a X11-Server: +As mentioned in the lecture, you absolutely need //terminal emulator//: 
-    * on Linux: it is enough to be logged-in in a graphical environment (UnityGnome, KDE, ...) + 
-    * on Mac OS X/OSX/macOS Sierra: you need [[https://www.xquartz.org/|XQuartz]] +  * on Linux: this can be one of programs Konsole, Gnome Terminal, Terminal, XTerm, ... 
-    * on Microsoft Windowsyou need [[http://sourceforge.net/projects/xming/files/latest/download|XMing]] +  * on Mac OS X/OSX/macOS Sierra: use the pre-installed Terminal application, [[https://www.iterm2.com/|iTerm2]] or the X-Windows terminal from XQuartz (see instructions below) 
-  * a terminal emulator: +  * on Windows: use [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|Putty]]
-    * on Linux: this can be one of Konsole, Gnome Terminal, Terminal, XTerm, ... +
-    * on Mac OS X/OSX/macOS Sierra: use the X-Windows terminal from XQuartz +
-    * on Windows: use [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|Putty]]+
  
 optionally you may want: optionally you may want:
  
 +  * a X11-Server, to be able to start graphical applications on the server and have the output on your computer:
 +    * on Linux: it is enough to be logged-in in a graphical environment (Unity, Gnome, KDE, ...)
 +    * on Mac OS X/OSX/macOS Sierra: you need to install [[https://www.xquartz.org/|XQuartz]]
 +    * on Microsoft Windows: you need to install [[http://sourceforge.net/projects/xming/files/latest/download|XMing]]
   * a file transfer tool to copy files from/to the server:   * a file transfer tool to copy files from/to the server:
     * on Linux: put ''%%sftp://tcopt3.chem.uzh.ch%%'' as the address in your file browser and you should be able to browse your home directory after logging in     * on Linux: put ''%%sftp://tcopt3.chem.uzh.ch%%'' as the address in your file browser and you should be able to browse your home directory after logging in
Line 24: Line 25:
   * a plain text editor to edit input files if you are uncomfortable with using ''vim'', ''nano'' or ''emacs'' via SSH. Please note: It is important that your editor supports Unix line endings. If in doubt, use one of the mentioned editors on the server, or an advanced plain text editor like [[https://atom.io/|Atom]] (plus the [[https://atom.io/packages/line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://notepad-plus-plus.org/|Notepad++]] on your local machine.   * a plain text editor to edit input files if you are uncomfortable with using ''vim'', ''nano'' or ''emacs'' via SSH. Please note: It is important that your editor supports Unix line endings. If in doubt, use one of the mentioned editors on the server, or an advanced plain text editor like [[https://atom.io/|Atom]] (plus the [[https://atom.io/packages/line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://notepad-plus-plus.org/|Notepad++]] on your local machine.
  
-Use the instructions giving in the lecture/available via OLAT to login on the server ''tcopt3.chem.uzh.ch'' using your assigned student account.+==== Login using Linux ==== 
 + 
 +  * Connect to Internet (use VPN when not on the UZH network) 
 +  * Open a terminal (Konsole, xterm or similar) 
 +  * Connect to the server by entering the command: ''ssh -X studentXX@tcopt3.chem.uzh.ch'' 
 + 
 + 
 +==== Login using macOS ==== 
 + 
 +  * Connect to Internet (use VPN when not on the UZH network) 
 +  * Open a X-Windows terminal in the X11 application if you want to run graphical applications on the server, otherwise use the pre-installed //Terminal// application or an alternative like //iTerm2// 
 +  * Connect to the server by entering the command: ''ssh -X studentXX@tcopt3.chem.uzh.ch'' 
 + 
 +==== Login using Windows ==== 
 + 
 +First configure Putty (only required on the first run) as follows: 
 + 
 +  - Start the application PuTTY from the Windows menu (in the folder PuTTY) 
 +  - Fill in the //Host Name//: ''tcopt3.chem.uzh.ch'' 
 +  - Set //Connection type// to ''SSH'' 
 +  - Type ''tcopt3'' as the name of the session below Saved Sessions and save the settings a first time 
 +  - In the Category tree on the left side, select //Connection > Data// and enter the username you have been given in the lecture in the field //Auto-login username// 
 +  - Select the tab ''Connection > SSH > X11'' from the ''Category'' list and enable the option ''Enable X11 Forwarding'' 
 +  - Go to //Session// again and  
 +  - Choose ''Session'' from the ''Category'' list and click ''Save'' again 
 + 
 +Then continue as follows to login: 
 + 
 +  * Connect to Internet (use VPN when not on the UZH network) 
 +  * Start Xming (optional, only required if you want to run graphical applications on the server) 
 +  * Start Putty 
 +  * Double click the session ''tcopt3'' to start the connection 
 +  * Enter (username and) password as requested 
 + 
 +==== First steps ====
  
 <note important>Change the password of your account after your first login, using: <note important>Change the password of your account after your first login, using:
 +
 <code> <code>
 $ passwd $ passwd
Line 178: Line 214:
 ==== Setup key-based authentication ==== ==== Setup key-based authentication ====
  
-To avoid having to type the password every time you log in (and to increase the security), keys can be used for authentication instead. The following instructions are **for OSX and Linux**.+To avoid having to type the password every time you log in (and to increase the security), a public-private key pair can be used for authentication instead. 
  
-First generate a key-pair **on your local machine** using+=== Instructions for macOS and Linux === 
 + 
 +First generate a key-pair **on your local machine** by running the following in a terminal/shell:
  
 <code> <code>
Line 186: Line 224:
 </code> </code>
  
-and accept the defaults proposed and do not set a password.+and accept the defaults proposed and do no set a password.
  
 Upload the public key **from your local machine** to tcopt3: Upload the public key **from your local machine** to tcopt3:
Line 194: Line 232:
 </code> </code>
  
-Now login to ''tcopt3.chem.uzh.ch'' and move the uploaded public key to the right place:+Now login to ''tcopt3.chem.uzh.ch'' and move the uploaded public key to the right place and set the access permissions correct:
  
 <code> <code>
Line 207: Line 245:
 $ ssh -i ~/.ssh/id_rsa studentXX@tcopt3.chem.uzh.ch $ ssh -i ~/.ssh/id_rsa studentXX@tcopt3.chem.uzh.ch
 </code> </code>
 +
 +=== Instructions for Windows using PuTTY ===
 +
 +First login to the server as above and leave the terminal window open.
 +
 +Then generate a key-pair **on your local machine** as follows:
 +
 +  - Start the application //PuTTYgen// which was installed alongside //PuTTY// itself
 +  - Click on //Generate// to generate a new key (move the mouse to generate randomness, as instructed)
 +  - Do not set a //Key passphrase//
 +  - Click on //Save private key// and store the private key as ''condensed_matter.ppk''
 +  - On the server (in the //PuTTY// terminal window), run the following commands:
 +    <code>
 +    $ mkdir -p .ssh
 +    $ chmod 0700 .ssh
 +    $ nano -w .ssh/authorized_keys
 +    </code>
 +  - Now copy & paste the content in the field //Public key for pasting into OpenSSH authorized_keys file// from //PuTTYgen// into the terminal. Pasting in //PuTTY// is done by a right mouse click.
 +  - Exit //nano// by using ''CTRL+X'', press ''Y'' to save the file and confirm the name by pressing ''ENTER''
 +  - Enter ''exit'' to close the connection
 +  - Close the //PuTTYgen// application
 +
 +Reconfigure //PuTTY// to use the generate key:
 +
 +  - Restart //PuTTY//
 +  - Select the //Session// ''tcopt3'' and press //Load//
 +  - Select //Connection > SSH > Auth//
 +  - Use the //Browse...// button in //Authentication parameters// to selected the ''condensed_matter.ppk'' you generated earlier
 +  - Go back to //Session// and click //Save//, then //Open// to login
 +  - Now //PuTTY// should directly login (given that you have saved the username as well as described above) without asking for a password
  
 ==== Simplify the login ==== ==== Simplify the login ====
exercises/2017_uzh_cmest/login.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1