-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-logging_in.html
142 lines (142 loc) · 10.3 KB
/
01-logging_in.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>Software Carpentry: HPC-novice</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="css/swc.css" />
<link rel="alternate" type="application/rss+xml" title="Software Carpentry Blog" href="http://software-carpentry.org/feed.xml"/>
<meta charset="UTF-8" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="lesson">
<div class="container card">
<div class="banner">
<a href="http://software-carpentry.org" title="Software Carpentry">
<img alt="Software Carpentry banner" src="img/software-carpentry-banner.png" />
</a>
</div>
<article>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<a href="index.html"><h1 class="title">HPC-novice</h1></a>
<h2 class="subtitle">Logging in</h2>
<section class="objectives panel panel-warning">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-certificate"></span>Learning Objectives</h2>
</div>
<div class="panel-body">
<ul>
<li>Explain logging in to a remote computer.</li>
<li>Download putty for Windows and log in (for all OSes present)</li>
</ul>
</div>
</section>
<p>How you log in to a remote system depends on what kind of computer you are using. We’ll cover Windows, Linux and Mac.</p>
<h2 id="windows">Windows</h2>
<ul>
<li>If you are logging into cowboy from a Windows machine, you will need to install a program called putty. You can download putty here: <a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe">http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe</a></li>
<li>Once you have downloaded putty, you can place the file on your desktop and double click it to launch the program.</li>
<li>In the box labeled <em>Host Name</em>, type the hostname of the system you want to log in to: <strong>cowboy.hpc.okstate.edu</strong>.</li>
<li>Check to make sure that the <em>Connection Type</em> is <strong>ssh</strong> and the <em>Port</em> number is <strong>22</strong>.</li>
<li>To save your session for next time (so you don’t have to retype each time) type a name into <em>Saved Sessions</em> and click <em>Save</em>. Next time you log in, all you will need to do is double click on the saved session name.</li>
<li>Click <em>Open</em> to open a connection with Cowboy. You will be asked for your user name and password. <strong>No characters will appear when you type in the password</strong>. This is a security feature. Don’t worry, just type the password you received when you set up your account and hit <enter>.</li>
<li>You should now have a command prompt. <em>Prompt</em> is a unix term that means the words followed by the <code>$</code> sign. This tells you that the terminal is waiting (<em>prompt</em>ing) for you to enter a command. To log out, simply type <code>exit</code> or <code>logout</code> and hit <enter>.</li>
</ul>
<h2 id="linux">Linux</h2>
<p>Launch a terminal, type the following and hit enter:</p>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="kw">ssh</span> [email protected]</code></pre>
<p>In the above example, <code>username</code> is your user name. For example, if your user name was <code>monkey,</code> you would type:</p>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="kw">ssh</span> [email protected]</code></pre>
<h2 id="macintosh">Macintosh</h2>
<p>Since the Macintosh OS is based off of Unix just like Linux, logging into Cowboy is very similar to logging in from a Linux computer:</p>
<ul>
<li>Double click on the <em>Hard Drive</em> icon.</li>
<li>Double click on the <em>Applications</em> folder.</li>
<li>Double click on the <em>Utilities</em> folder.</li>
<li>Double click on <em>Terminal</em>.</li>
</ul>
<p>Now that you have launched the terminal, follow the same directions as logging in with a Linux computer.</p>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>The command prompt</h2>
</div>
<div class="panel-body">
<p>In these lessons, the command prompt is shown as <code>$</code> and indicates that the terminal is waiting for you to type your next command. In reality, your command prompt will have some text preceding the <code>$</code> which may include your username, the name of the computer, the directory you are in, and more depending on the way it is configured.</p>
</div>
</aside>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>Case sensitivity</h2>
</div>
<div class="panel-body">
<p>Everything in linux is case sensistive, including your username and password. For example, <code>my_input_data.txt</code> is <strong><em>not</em></strong> the same as <code>My_Input_Data.txt</code></p>
</div>
</aside>
<h2 id="changing-your-password">Changing your Password</h2>
<p>The first time you log in, you should change your password from the default password assigned when your account was created to a more secure (and easier to remember) password of your choosing. Type the following and hit enter:</p>
<pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">passwd</span></code></pre>
<p>You should see the following text (for the purposes of this tutorial we will use the example user name monkey):</p>
<pre class="output"><code>Changing password for user monkey.
Current Password:</code></pre>
<p>Type in your current password (currently the default password assigned to you) and hit <enter>. You will then be prompted to enter a new password twice. From now on, you will log into the system with this new password. Please choose a <strong>STRONG</strong> password.</p>
<h2 id="logging-out">Logging Out</h2>
<p>To log out just type:</p>
<pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="kw">exit</span></code></pre>
<p>You can also use the key combination <code>Ctrl-D.</code></p>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>Login Nodes</h2>
</div>
<div class="panel-body">
<p>When you log in, you are on a login node. Remember, an HPC system actually a network of many computers (“nodes”) linked together by a high speed network so that they can communicate and can combine computing power in order to complete a task faster than any single computer.</p>
<p>Login nodes are for logging in, working with files, and for submitting jobs. Always submit jobs to the scheduler, and never run a job from a login node. We will explain job submission more thoroughly later in this tutorial.</p>
</div>
</aside>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>Using the Mouse</h2>
</div>
<div class="panel-body">
<p>When logged into like we have here, you are using a terminal so you mouse does not do anything. All commands are typed and interaction with the computer is text based. The one exception is that your mouse can be used to copy and paste. If you highlight any text in the terminal (putty only, use your usual copy and paste on Linux and Mac) with your mouse it is automatically copied. To paste it either right click (in putty) or click the middle button/scroll wheel of your mouse.</p>
</div>
</aside>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>Why Use a Terminal?</h2>
</div>
<div class="panel-body">
<p>So why use a terminal? Wouldn’t it be easier if HPC systems had a graphical user interface (GUI) with buttons and a mouse like most modern personal computers? While there is a steep learning curve associated with using a terminal, terminal based computer systems are ideally suited for certain types of computing. Consider a research scientist who has data files containing the results of their research. Each run of the experiment contains data from that run and in the course of their research, the scientist must make a change to each one of the files. If there are only twenty data files then clicking on each file to open it and change it, while time consuming is doable. However, what does the scientist do for an experiment that has 200 runs, or even 2,000? Unless they employ a lot of graduate students, our poor researcher will not be able to complete their research in a timely manner. The terminal has a nice set of features that allows us to automate such tasks so that the computer does the work for us. We will talk more about these options later. Remember, while the terminal has a steep learning curve, it is an investment that pays itself back later by saving you time.</p>
</div>
</aside>
<aside class="callout panel panel-info">
<div class="panel-heading">
<h2><span class="glyphicon glyphicon-pushpin"></span>Using more than one terminal at a time</h2>
</div>
<div class="panel-body">
<p>Somtimes you will want to be able to edit files or do work in different locations in the file system at the same time. Rather than repeatedly moving back and forth, you can open another terminal exactly as described above.</p>
</div>
</aside>
<p>You’re now ready to move on to <a href="02-submit_first_job.html">Submit first job</a></p>
</div>
</div>
</article>
<div class="footer">
<a class="label swc-blue-bg" href="http://software-carpentry.org">Software Carpentry</a>
<a class="label swc-blue-bg" href="https://github.com/swcarpentry/lesson-template">Source</a>
<a class="label swc-blue-bg" href="mailto:[email protected]">Contact</a>
<a class="label swc-blue-bg" href="LICENSE.html">License</a>
</div>
</div>
<!-- Javascript placed at the end of the document so the pages load faster -->
<script src="http://software-carpentry.org/v5/js/jquery-1.9.1.min.js"></script>
<script src="css/bootstrap/bootstrap-js/bootstrap.js"></script>
</body>
</html>