<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>the lost logbook &#187; amazon</title> <atom:link href="http://utkarshsengar.com/tag/amazon/feed/" rel="self" type="application/rss+xml" /><link>http://utkarshsengar.com</link> <description>Utkarsh&#039;s mind.random() on Programming, India and Startups</description> <lastBuildDate>Sat, 12 May 2012 11:38:11 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Manage multiple Linux Users on 1 Amazon EC2 Instance</title><link>http://utkarshsengar.com/2011/01/manage-multiple-accounts-on-1-amazon-ec2-instance/</link> <comments>http://utkarshsengar.com/2011/01/manage-multiple-accounts-on-1-amazon-ec2-instance/#comments</comments> <pubDate>Thu, 06 Jan 2011 19:11:59 +0000</pubDate> <dc:creator>Utkarsh</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[amazon]]></category> <category><![CDATA[ec2]]></category> <category><![CDATA[user-management]]></category> <guid
isPermaLink="false">http://utkarshsengar.com/?p=480</guid> <description><![CDATA[In an organization of say 5, some times you need to give many people access to the same EC2 Instance. Sharing the private key and the password b/w 5 users is definitely not a good idea! So, how do you fix this problem? You create multiple accounts on the Linux EC2 instance and generate keys [...]]]></description> <content:encoded><![CDATA[<p><img
class="alignleft" title="AWS" src="http://img689.imageshack.us/img689/8533/awslogocmyk.jpg" alt="" width="248" height="90" />In an organization of say 5, some times you need to give many people access to the same EC2 Instance. <span
style="text-decoration: underline;">Sharing the private key and the password b/w 5 users is definitely not a good idea</span>!</p><p>So, how do you fix this problem? You create multiple accounts on the Linux EC2 instance and generate keys for every individual accounts, here is how you do it:<br
/> <span
id="more-480"></span></p><h2>Step 0. Login by default user, &#8220;ec2-user&#8221;:</h2><div
class="wp_codebox"><table><tr
id="p48013"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code13"><pre class="bash" style="font-family:monospace;">static-<span style="color: #000000;">9</span>:ec2_thelostlogbook utkarsh$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-i</span> my_key.pem ec2-user<span style="color: #000000; font-weight: bold;">@</span>111.111.11.111</pre></td></tr></table></div><h2>Step 1. Create a new user, we will call our new user &#8220;john&#8221;:</h2><div
class="wp_codebox"><table><tr
id="p48014"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code14"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ec2-user<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> adduser john</pre></td></tr></table></div><p>Set password for &#8220;john&#8221; by:</p><div
class="wp_codebox"><table><tr
id="p48015"><td
class="line_numbers"><pre>1
2
</pre></td><td
class="code" id="p480code15"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ec2-user<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ec2-user<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">passwd</span> john</pre></td></tr></table></div><p>Add &#8220;john&#8221; to sudoer&#8217;s list by:</p><div
class="wp_codebox"><table><tr
id="p48016"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code16"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ec2-user<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ visudo</pre></td></tr></table></div><p>and add this to the last line:</p><div
class="wp_codebox"><table><tr
id="p48017"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code17"><pre class="bash" style="font-family:monospace;">john   ALL = <span style="color: #7a0874; font-weight: bold;">&#40;</span>ALL<span style="color: #7a0874; font-weight: bold;">&#41;</span>    ALL</pre></td></tr></table></div><p>Alright! We have our new user created, now you need to generate the key file which will be needed to login, like we have my_key.pem in Step 0.</p><p>Now, exit and go back to ec2-user, out of root.</p><h2>Step 2. Creating the public and private keys:</h2><div
class="wp_codebox"><table><tr
id="p48018"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code18"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ec2-user<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">su</span> john</pre></td></tr></table></div><p>Enter the password you created for &#8220;john&#8221; in Step 1.</p><div
class="wp_codebox"><table><tr
id="p48019"><td
class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td
class="code" id="p480code19"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ec2-user<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>john<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-b</span> <span style="color: #000000;">1024</span> <span style="color: #660033;">-f</span> john <span style="color: #660033;">-t</span> dsa
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> .ssh
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> .ssh
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> john.pub <span style="color: #000000; font-weight: bold;">&gt;</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> john:ec2-user .ssh</pre></td></tr></table></div><p>In the above step, john is the user we created and ec2-user is the default user group.</p><div
class="wp_codebox"><table><tr
id="p48020"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code20"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> john:ec2-user .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></td></tr></table></div><h2>Step 3. Now you just need to download the key called &#8220;john&#8221;</h2><p>I use <a
href="http://www.hypexr.org/linux_scp_help.php">scp</a> to download/upload files from EC2, here is how you can do it:</p><p>You will still need to copy the file using ec2-user, since you only have the key for that user name. So, you will need to move the key to ec2-user folder and chmod it to 777.</p><div
class="wp_codebox"><table><tr
id="p48021"><td
class="line_numbers"><pre>1
2
</pre></td><td
class="code" id="p480code21"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> john <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ec2-user<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>john<span style="color: #000000; font-weight: bold;">@</span>ip-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">111</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ec2-user<span style="color: #000000; font-weight: bold;">/</span>john</pre></td></tr></table></div><p>Now come to local machine&#8217;s terminal, where you have my_key.pem file and do this:</p><div
class="wp_codebox"><table><tr
id="p48022"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code22"><pre class="bash" style="font-family:monospace;">static-<span style="color: #000000;">9</span>:ec2_thelostlogbook utkarsh$ <span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #660033;">-i</span> my_key.pem ec2-user<span style="color: #000000; font-weight: bold;">@</span>111.111.11.111:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>ec2-user<span style="color: #000000; font-weight: bold;">/</span>john john</pre></td></tr></table></div><p>The above command will copy the key &#8220;john&#8221; to the present working directory on your local machine. Once you have copied the key to your local machine, you should delete &#8220;/home/ec2-user/john&#8221;, since it&#8217;s a private key.</p><p>Now, one your local machine chmod john to 600.</p><div
class="wp_codebox"><table><tr
id="p48023"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code23"><pre class="bash" style="font-family:monospace;">static-<span style="color: #000000;">9</span>:ec2_thelostlogbook utkarsh$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> john</pre></td></tr></table></div><h2>Step 4. Time to test your key:</h2><div
class="wp_codebox"><table><tr
id="p48024"><td
class="line_numbers"><pre>1
</pre></td><td
class="code" id="p480code24"><pre class="bash" style="font-family:monospace;">static-<span style="color: #000000;">9</span>:ec2_thelostlogbook utkarsh$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-i</span> john john<span style="color: #000000; font-weight: bold;">@</span>111.111.11.111</pre></td></tr></table></div><p>So, in this manner, you can setup multiple users to use one EC2 instance!!</p><p>PS: Please post your comments if you find any error.</p> ]]></content:encoded> <wfw:commentRss>http://utkarshsengar.com/2011/01/manage-multiple-accounts-on-1-amazon-ec2-instance/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>Amazon RDS &#8211; The next move to Cloud</title><link>http://utkarshsengar.com/2009/11/amazon-rds-the-next-move-to-cloud-by-amazon-web-services/</link> <comments>http://utkarshsengar.com/2009/11/amazon-rds-the-next-move-to-cloud-by-amazon-web-services/#comments</comments> <pubDate>Tue, 10 Nov 2009 05:32:17 +0000</pubDate> <dc:creator>Utkarsh</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[amazon]]></category> <category><![CDATA[aws]]></category> <category><![CDATA[blue cloud]]></category> <category><![CDATA[cloud]]></category> <category><![CDATA[computing]]></category> <category><![CDATA[fresh]]></category> <category><![CDATA[internet]]></category> <category><![CDATA[oracle]]></category> <category><![CDATA[rds]]></category> <guid
isPermaLink="false">http://utkarshsengar.com/?p=54</guid> <description><![CDATA[Amazon.com, started in 1994 is one of the greatest example of diversification of an e-commerce player. Started out as an online book store has diversified it self to an online e-commerce website, the Kindle, even door to door grocery delivery service with AmazonFresh and now of the biggest player in the Cloud Computing business!! So, [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.amazon.com"><img
class="alignleft" title="Amazon AWS" src="http://img80.imageshack.us/img80/8789/logoaws.gif" alt="" width="164" height="60" />Amazon.com</a>, started in 1994 is one of the greatest example of <a
href="http://industry.bnet.com/technology/10002249/amazons-dizzy-diversification-dance/">diversification</a> of an e-commerce player. Started out as an<a
href="http://en.wikipedia.org/wiki/Amazon.com"> online book store </a>has diversified it self to an online e-commerce website, the <a
href="http://industry.bnet.com/technology/10002249/amazons-dizzy-diversification-dance/">Kindle</a>, even <a
href="http://en.wikipedia.org/wiki/AmazonFresh">door to door grocery delivery service</a> with AmazonFresh and now of the<a
href="http://searchcloudcomputing.techtarget.com/news/article/0,289142,sid201_gci1355062,00.html"> biggest player in the Cloud Computing</a> business!!</p><p><span
id="more-54"></span>So, the Amazon&#8217;s <a
href="http://www.wired.com/techbiz/it/magazine/16-05/mf_amazon">cloud</a> with <a
href="http://aws.amazon.com/">Amazon Web services</a> is expanding even more with the <a
href="http://aws.amazon.com/rds/">Amazon Relational Database Service</a>. If you are wondering what is AWS? Check these out: <a
href="http://aws.amazon.com/what-is-aws/">Link1</a>, <a
href="http://www.google.com/search?hl=en&amp;defl=en&amp;q=define:Amazon+Web+Services&amp;ei=nq34Ss7uJYyOtAPNoeTFCQ&amp;sa=X&amp;oi=glossary_definition&amp;ct=title&amp;ved=0CAcQkAE">Link2</a></p><p>Amazon Web Services offers loads of <a
href="http://en.wikipedia.org/wiki/Amazon_Web_Services">remote computing services</a> which cab be <a
href="http://aws.amazon.com/solutions/case-studies/">used by anyone</a> ranging from a SME, a big firm, a small blog etc.</p><p>So, what is this Amazon RDS? Well, to put it in simple words, its just a <a
href="http://en.wikipedia.org/wiki/MySQL">MySQL 5.1 database</a> hosted on Amazon servers. You do not need to worry about the setup, maintenance and security issues, Amazon will do all that for you!</p><p>RDS in the words of Mr Werner Vogles, CTO Amazon.com [<a
href="http://www.allthingsdistributed.com/">BLOG</a>]</p><blockquote><p><strong>Amazon RDS</strong> for when the application requires a relational database but you want to reduce the time you spend on database management, Amazon RDS automates common administrative tasks to reduce your complexity and total cost of ownership. Amazon RDS allows you to manage your database compute and storage resources with a simple API call, and only pay for the infrastructure resources they actually consume.</p></blockquote><p
style="text-align: center;"><img
class="aligncenter" title="Amazon AWS Tag Cloud" src="http://img148.imageshack.us/img148/4541/etcnologo.jpg" alt="" width="480" height="242" /></p><p>There are few major players competing against Amazon like <a
href="http://websphere.sys-con.com/node/1002933">IBM  BlueCloud</a>, <a
href="http://www.microsoft.com/windowsazure/windowsazure/">Microsoft Azure</a>, <a
href="http://www.rackspacecloud.com/">Rackspace Mosso</a> to name a few. This is also considered as a boost for <a
href="http://www.mysql.com/products/enterprise/cloud.html">MySQL cloud computing solutions</a>.</p><p>The <a
href="http://www.oracle.com/technology/tech/cloud/faq.html#Oracle_AWS">Oracle and Amazon love story</a> will be interesting, let see what this relationship holds for us in the future of Cloud.</p><p>What do you guys think about the Cloud, Amazon-Oracle tie-up and what is Google and MSFT going to do about it?!</p><div
id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;"><h3 class="entry-header">Amazon Relational Database ServiceA</h3></div> ]]></content:encoded> <wfw:commentRss>http://utkarshsengar.com/2009/11/amazon-rds-the-next-move-to-cloud-by-amazon-web-services/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
