exercises:2016_uzh_cmest:login
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
exercises:2016_uzh_cmest:first_simulation_run [2016/09/21 11:21] – [Module loading] tmueller | exercises:2016_uzh_cmest:login [2016/09/22 09:48] – tmueller | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | In this exercise you will learn how to run your first calculation. | + | In this exercise you will learn how to login and run commands on our infrastructure. |
===== Part I: Login ===== | ===== Part I: Login ===== | ||
Line 149: | Line 149: | ||
+ | ===== Part III: Advanced account configuration ===== | ||
+ | |||
+ | ==== Make module loading persistent ==== | ||
+ | |||
+ | Upon login, the shell ('' | ||
+ | |||
+ | < | ||
+ | $ echo ' | ||
+ | </ | ||
+ | |||
+ | after that you can add and remove modules to be loaded at startup using '' | ||
+ | |||
+ | To add '' | ||
+ | |||
+ | < | ||
+ | $ module initadd vmd | ||
+ | $ module initadd cp2k/ | ||
+ | </ | ||
+ | |||
+ | to remove '' | ||
+ | |||
+ | < | ||
+ | $ module initrm vmd | ||
+ | </ | ||
+ | |||
+ | Alternatively you can of course simply edit '' | ||
+ | |||
+ | ==== 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**. | ||
+ | |||
+ | First generate a key-pair **on your local machine** using | ||
+ | |||
+ | < | ||
+ | $ ssh-keygen | ||
+ | </ | ||
+ | |||
+ | and accept the defaults proposed and do not set a password. | ||
+ | |||
+ | Upload the public key **from your local machine** to tcopt3: | ||
+ | |||
+ | < | ||
+ | $ scp ~/ | ||
+ | </ | ||
+ | |||
+ | Now login to '' | ||
+ | |||
+ | < | ||
+ | $ mkdir -p .ssh | ||
+ | $ chmod 0700 .ssh | ||
+ | $ mv id_rsa.pub .ssh/ | ||
+ | </ | ||
+ | |||
+ | When connecting to the server **from your local machine** now, use: | ||
+ | |||
+ | < | ||
+ | $ ssh -i ~/ | ||
+ | </ | ||
+ | |||
+ | ==== Simplify the login ==== | ||
+ | |||
+ | The following instructions apply **apply to OSX and Linux**. | ||
+ | |||
+ | **On your local machine** add the following part to the file '' | ||
+ | |||
+ | < | ||
+ | Host tcopt3 | ||
+ | HostName tcopt3.chem.uzh.ch | ||
+ | User studentXX | ||
+ | </ | ||
+ | |||
+ | after which you will be able to connect to '' | ||
+ | |||
+ | < | ||
+ | $ ssh tcopt3 | ||
+ | </ | ||
+ | |||
+ | If you have setup key-based authentication as shown above, augment the entry to the following instead, to always use key-based authentication without having to specify '' | ||
+ | |||
+ | < | ||
+ | Host tcopt3 | ||
+ | HostName tcopt3.chem.uzh.ch | ||
+ | User studentXX | ||
+ | IdentityFile ~/ | ||
+ | IdentitiesOnly yes | ||
+ | PreferredAuthentications publickey | ||
+ | </ |
exercises/2016_uzh_cmest/login.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1