-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
443 lines (273 loc) · 18.5 KB
/
index.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Simon's Blog</title>
<meta name="author" content="Simon Gao">
<meta name="description" content="Mar 25th, 2014 Dreamspark Is Back to Rutgers Earlier this semester, all of us received this message when we login to Rutgers Dreamspark. It’s …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="" rel="alternate" title="Simon's Blog" type="application/atom+xml">
<link rel="canonical" href="http://ssgao.com/">
<link href="/favicon.png" rel="shortcut icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/stylesheets/font-awesome.min.css" media="screen, projection" rel="stylesheet" type="text/css">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-49440705-1']);
_gap.push(['_setDomainName', 'github.io']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="container">
<div class="left-col">
<div class="intrude-less">
<header id="header" class="inner"><div class="profilepic">
<script src="/javascripts/md5.js"></script>
<script type="text/javascript">
$(function(){
$('.profilepic').append("<img src='http://www.gravatar.com/avatar/" + MD5("[email protected]") + "?s=160' alt='Profile Picture' style='width: 160px;' />");
});
</script>
</div>
<hgroup>
<h1><a href="/">Simon's Blog</a></h1>
</hgroup>
<nav id="main-nav"><ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<nav id="sub-nav">
<div class="social">
<a class="email" href="mailto:[email protected]" title="Email">Email</a>
<a class="facebook" href="http://www.facebook.com/simongao888" title="Facebook">Facebook</a>
<a class="google" href="https://plus.google.com/+SimiaoGao" rel="author" title="Google+">Google+</a>
<a class="twitter" href="http://twitter.com/simongao888" title="Twitter">Twitter</a>
<a class="github" href="https://github.com/ssgao" title="GitHub">GitHub</a>
<a class="stackoverflow" href="http://stackoverflow.com/users/1102648/ssgao" title="StackOverflow"></a>
<a class="linkedin" href="http://www.linkedin.com/in/ssgao" title="LinkedIn">LinkedIn</a>
</div>
</nav>
</header>
</div>
</div>
<div class="mid-col">
<div class="mid-col-container">
<div id="content" class="inner">
<div itemscope itemtype="http://schema.org/Blog">
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-03-25T22:47:47-04:00" data-updated="true" itemprop="datePublished">Mar 25<span>th</span>, 2014</time></div>
<div class="tags">
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/03/25/dreamspark-is-back-to-rutgers/" itemprop="url">Dreamspark Is Back to Rutgers</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>Earlier this semester, all of us received this message when we login to <a href="http://elms.rutgers.edu/">Rutgers Dreamspark</a>.</p>
<p><img src="/images/2014-03-25-Dreamspark-Old.png" alt="Old Dreamspark" /></p>
<p>It’s like…</p>
<p><img src="http://img1.wikia.nocookie.net/__cb20131023120133/nickfanon/images/e/e0/What-the-fuck-is-that.jpg" alt="WTF" /></p>
<p>However, turns out that Dreamspark is still there, it’s just that the address is changed.</p>
<p>Here’s how you can access it:</p>
<ol>
<li>Go to <a href="https://www.dreamspark.com/Student/Default.aspx">Dreamspark.com</a></li>
<li>In the lower half of the page, you’ll find a tab named <strong>3. More Software Through Your School</strong>. Click that.
<img src="/images/2014-03-25-Tab-3.png" alt="Tab 3" /></li>
<li>Under the tab, you’ll see a search box, enter <strong>rutgers</strong>, click the search icon.
<img src="/images/2014-03-25-Search-Rutgers.png" alt="Search Rutgers" /></li>
<li>You’ll see a dropdown shows up with different Rutgers schools/departments. Select the one you are in.
<img src="/images/2014-03-25-Selected-CS.png" alt="Selected CS" /></li>
<li>Click <strong>Visit the WebStore</strong>. If You see a pop-up shows up, click <strong>continue</strong>.
<img src="/images/2014-03-25-Rutgers-DreamSpark.png" alt="Rutgers Dreamspark" /></li>
<li>Click Sign In on the upper-right corner, you’ll be redirected to Rutgers CAS. Sign in with your Rutgers username/password</li>
<li>Now you are back to Dreamspark page. Click DreamSpark Premium
<img src="/images/2014-03-25-Dreamspark-Premium.png" alt="Dreamspark Premium" /></li>
<li><strong>WOW!! You are back!! And not only you are back, all your previous subscriptions are CLREARED! so you are start fresh!!</strong>
<img src="/images/2014-03-25-Dreamspark-New.png" alt="Dreamspark New" /></li>
</ol>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-02-07T21:53:05-05:00" data-updated="true" itemprop="datePublished">Feb 7<span>th</span>, 2014</time></div>
<div class="tags">
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/02/07/how-to-ssh-into-a-remote-host-without-password/" itemprop="url">How to SSH Into a Remote Host Without Password</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>How do you identify yourself to a machine?</p>
<p>A intuitive answer would be to type in your username and password. That’s what we normally do before we pay credit card, check grade, chat on facebook.</p>
<p>Well, remember that except a few occasions, normally the website that asks you to log in has an option that says “remember me on this computer”? Isn’t that convenient? Isn’t typing username and password during ssh process always a pinapple in the ass?</p>
<p>It turns out that SSH can do just the thing.</p>
<p>The machanism is a little bit hard to explain, which I think I should just come back later, let’s see how it works.</p>
<p>First, under your local host’s shell, type in</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>ssh-keygen -t rsa -C <span class="s2">"[email protected]"</span>
</span></code></pre></td></tr></table></div></figure>
<p>It’ll ask you for filename and password, just type enter when it asks for filename. For password, type in the one that you can always remember because you’ll use it over and over again.</p>
<p>The output looks like:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>Generating public/private rsa key pair.
</span><span class='line'>Enter file in which to save the key <span class="o">(</span>/home/simongao/.ssh/id_rsa<span class="o">)</span>:
</span><span class='line'>Enter passphrase <span class="o">(</span>empty <span class="k">for </span>no passphrase<span class="o">)</span>:
</span><span class='line'>Enter same passphrase again:
</span><span class='line'>Your identification has been saved in /home/simongao/.ssh/id_rsa.
</span><span class='line'>Your public key has been saved in /home/simongao/.ssh/id_rsa.pub.
</span><span class='line'>The key fingerprint is:
</span><span class='line'>f5:38:e4:1a:5f:a2:05:aa:3e:cd:79:00:bd:70:83:bb [email protected]
</span><span class='line'>The key<span class="err">'</span>s randomart image is:
</span><span class='line'>+--<span class="o">[</span> RSA 2048<span class="o">]</span>----+
</span><span class='line'>| |
</span><span class='line'>| |
</span><span class='line'>| o . o |
</span><span class='line'>| + +. <span class="o">=</span> o |
</span><span class='line'>| <span class="o">=</span>.oS * o |
</span><span class='line'>| ..o * + |
</span><span class='line'>| .+ oo . |
</span><span class='line'>| .E + . |
</span><span class='line'>| .. . |
</span><span class='line'>+-----------------+
</span></code></pre></td></tr></table></div></figure>
<p>After the process’s complete, under your home directory will appear folder named <em>.ssh</em>. inside this folder there are two files: <em>id_rsa</em> and <em>id_rsa.pub</em>. For now, think <em>id_rsa.pub</em> as your username and think <em>id_rsa</em> as your password. Keep the <em>id_rsa</em> “your password” to yourself and not to anyone else because this is your secret identity now.</p>
<p>If you have a github repo set up, odds are that you’ve done this already!</p>
<p>Next you need to send your <em>id_rsa.pub</em> “your username” to the server so that it has a record of you.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>ssh-copy-id <span class="s2">"username@remote-host"</span>
</span><span class='line'><span class="c"># for example: ssh-copy-id "[email protected]" </span>
</span><span class='line'><span class="c"># note that by using this command I am assuming that you didn't change the name of your key pairs which you generated from using earlier command from id_rsa to other names</span>
</span></code></pre></td></tr></table></div></figure>
<p>The output looks like</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>[email protected]<span class="sb">`</span>s password:
</span><span class='line'>Now try logging into the machine, with <span class="s2">"ssh '[email protected]'"</span>, and check in:
</span><span class='line'>
</span><span class='line'> .ssh/authorized_keys
</span><span class='line'>
</span><span class='line'>to make sure we haven<span class="sb">`</span>t added extra keys that you weren<span class="sb">`</span>t expecting.
</span></code></pre></td></tr></table></div></figure>
<p>Congradulations! Now you’ve sent your “username” to the remote host. The remote host has your record.</p>
<p>Now, try ssh again.</p>
<p>Wait a minute, is it still asking you for username?</p>
<p>For some stupid reason that <a href="http://askubuntu.com/questions/389921/how-to-avoid-typing-ssh-add-everytime">I haven’t figure out</a>. Every time you start a shell, you always has to do <code>ssh-add</code> and type in the password to unlock your <em>id_rsa</em> file. Let’s just remember this step, so type in <code>ssh-add</code> to your shell every time you start it.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>ssh-add
</span><span class='line'><span class="c"># Enter passphrase for /home/simongao/.ssh/id_rsa: </span>
</span><span class='line'><span class="c"># Identity added: /home/simongao/.ssh/id_rsa (/home/simongao/.ssh/id_rsa)</span>
</span></code></pre></td></tr></table></div></figure>
<p>Now, try ssh again.</p>
<p>It worked!! You don’t need to type in password to ssh anymore!</p>
<p>Well, that’s what I hope, but occassionally shit happens. Like what happened to a CentOS server that I have for our big data project. <a href="http://stackoverflow.com/questions/5251723/centos-scp-without-password-not-working">Check this SO post for a similar thing that happened</a>.</p>
<p>I’ve been googling for how to solve this problem for an entire afternoon and evening, and heavily modified my <em>/etc/ssh/sshd_config</em> file, but still cannot solve it until a point from my friend. Though I don’t know why this worked, neither do my friend, but I’d just share it with you and see if it helps.</p>
<p>Inside your <em>/etc/ssh/sshd_config</em> file, there’s a configuration called <em>StrictModes</em>. By default, it’s either unset or turned to <em>yes</em>. You have to set it to <em>no</em> by adding this line to the file</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>StrictModes no
</span></code></pre></td></tr></table></div></figure>
<p>That finally solved my issue.</p>
<p>Hope it works for you as well.</p>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-01-31T14:19:04-05:00" data-updated="true" itemprop="datePublished">Jan 31<span>st</span>, 2014</time></div>
<div class="tags">
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/01/31/why-i-started-this-blog/" itemprop="url">Why I Started This Blog</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>Hello~</p>
<p>I’ve been thinking what should I post for the first blog for awhile, but haven’t really came up with any good idea. So rather than me keep thinking forever, let’s just talk about why I created this blog site.</p>
<p>As a novice developer, I often found myself struggling with two things:</p>
<ol>
<li><strong>Bad Long Term Memory</strong>. Let’s say that I want to set up something, for example, setting up hadoop server. I read instructions from book, google when I encounter a problem, and ask on stackoverflow if solution cannot be found. Eventually, I completed the task. Then six month later, something happens and I have to redo this exact same task again. Suddenly, I found that all my memory about what I did has been totally flushed. So, in the end, I have to start fresh again. This is really inefficient.</li>
<li><strong>Need a New Project Idea</strong>. I always want to create something, that’s really why I choose to be a developer, but often of the time I found that coming up with a project idea is hard. So, with all the knowledge and skills, I have nothing to do.</li>
</ol>
<p>That sorta explains why I need this blog: to log what I’ve done and to write thoughts that come up to my mind which has the potential to turn up to be a project.</p>
<p>It is a naive approach, but I seriously hope this could be a good start.</p>
</div>
</article>
</div>
<nav id="pagenavi">
<div class="center"><a href="/blog/archives">Blog Archives</a></div>
</nav></div>
</div>
<footer id="footer" class="inner"><p>
Copyright © 2014 - Simon Gao -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
Design credit: <a href="http://shashankmehta.in/archive/2012/greyshade.html">Shashank Mehta</a></footer>
<script type="text/javascript">
var disqus_shortname = 'ssgao';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</div>
</div>
</body>
</html>