{"id":18978,"date":"2010-05-26T08:09:27","date_gmt":"2010-05-26T08:09:27","guid":{"rendered":"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/unix-sysadmin-boot-camp-ssh\/"},"modified":"2010-05-26T08:09:27","modified_gmt":"2010-05-26T08:09:27","slug":"unix-sysadmin-boot-camp-ssh","status":"publish","type":"post","link":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/planetology\/unix-sysadmin-boot-camp-ssh.php","title":{"rendered":"UNIX Sysadmin Boot Camp: SSH"},"content":{"rendered":"<p><img decoding=\"async\" class=\"profile\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/e7ed8_rrobson.jpg\" alt=\"Ryan Robson\" style=\"padding-left:10px; padding-right: 10px;\">You&rsquo;ve had the weekend to mentally prepare yourself for the first &ldquo;workout&rdquo; in our UNIX Sysadmin Boot Camp, so now that you&rsquo;ve finished stretching your hammies, we&rsquo;ll jump right into training. In <a href=\"http:\/\/blog.theplanet.com\/2010\/05\/21\/unix-sysadmin-boot-camp-welcome-to-the-jungle\/\">Welcome to the Jungle<\/a>, I talked about the command line as a fantastically powerful resource, so my goal is to help you wield that power. <\/p><p>Before you can do any actual wielding, you&rsquo;re going to need to know how to find this exotic &ldquo;command line&rdquo; we&rsquo;ve already talked so much about. Unless you managed to sneak your way through the layers upon layers of security and into your server&rsquo;s data center, you won&rsquo;t be able to plug a keyboard and monitor directly into your server. You do have access to the next best thing, though: the Secure Shell &ndash; or SSH &ndash; network protocol. SSH allows data to be exchanged securely between two networked devices, and when the &ldquo;network&rdquo; between your workstation and server is the Internet, the fact that it does so &ldquo;securely&rdquo; is significant.<\/p><p>Instructions to SSH into your server are included in your introductory information from The Planet, as well as in your <a href=\"https:\/\/orbit.theplanet.com\/\">Orbit<\/a> interface. You can use a third-party client such as <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\">PuTTY<\/a>, <a href=\"http:\/\/winscp.net\/eng\/index.php\">WinSCP<\/a> if your workstation is Windows-based, or if you&rsquo;re on Linux or Mac, you can access SSH from your terminal application: <code>ssh user@ipaddress<\/code>. Once you&rsquo;ve gotten into your server, you&rsquo;ll probably want to find out where you are, so give the <code>pwd<\/code> command a try:<\/p><p><\/p><pre><code>user@serv: ~$ pwd\/home\/useruser@serv: ~$<\/code><\/pre><p>It&rsquo;s as easy as that. Now we know we&rsquo;re in the <code>\/home\/user<\/code> directory. Most of the time, you&rsquo;ll find yourself starting in your home directory. This is where you can put personal files and documents. It&rsquo;s kind of like &ldquo;My Documents&rdquo; in Windows, just on your server.<\/p><p>Now that you know where you are, you&rsquo;ll probably want to know what&rsquo;s in there. Take a look at these commands (extracted from a RedHat environment, but also usable in CentOS and many other distributions):<\/p><table><tr><td><code>user@serv: \/usr\/src $ ls<\/code><\/td><td>This will give you a basic listing of the current directory.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src $ ls \/usr\/src\/redhat<\/code><\/td><td>This will list the contents of another specified directory.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src $ ls .\/redhat<\/code> <\/td><td>Using a &ldquo;relative pathname,&rdquo; this will perform the same action as above.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src $ ls redhat<\/code><\/td><td>Most of the time, you&rsquo;ll get the same results even without the &ldquo;<code>.\/<\/code>&rdquo; at the beginning.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src $ cd \/usr\/src\/redhat\/<\/code><\/td><td>This is an example of using the <code>cd<\/code> command to change directories to an absolute pathname.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src $ cd redhat<\/code><\/td><td>This is an example of using the <code>cd<\/code> command to change directories to a relative pathname.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src\/redhat $ cd \/usr\/src<\/code><\/td><td>To move back on directory from the working directory, you can use the destination&rsquo;s absolute path.<\/td><\/tr><tr><td><code>user@serv: \/usr\/src\/redhat $ cd ..<\/code><\/td><td>Or, since the desired directory is one step down, you can use twp dots to move back.<\/td><\/tr><\/table><p>You&rsquo;ll notice many similarities to the typical Windows DOS prompts, so it helps if you&rsquo;re familiar with navigating through that interface: <code>dir<\/code>, <code>cd<\/code>, <code>cd ..<\/code>, <code>cd \/<\/code>. Everything else on the other hand, will prove to be a bit different.<\/p><p>Now that you&rsquo;re able to access this soon-to-be-powerful-for-you tool, you need to start learning the language of the natives: <strong>bash<\/strong>. In our next installment, we&rsquo;ll take a crash course in bash, and you&rsquo;ll start to get comfortable navigating and manipulating content directly on your server.<\/p><p>-Ryan<\/p><div><h4>Related Posts:<\/h4><ul><li><a href=\"http:\/\/blog.theplanet.com\/2009\/05\/26\/mysql-update-from-hidden-select\/\" rel=\"bookmark\">MySQL &ndash; UPDATE from (Hidden) SELECT<\/a><\/li><li><a href=\"http:\/\/blog.theplanet.com\/2010\/02\/11\/how-i-learned-to-stop-worrying-and-love-permissions\/\" rel=\"bookmark\">How I Learned to Stop Worrying and Love Permissions<\/a><\/li><li><a href=\"http:\/\/blog.theplanet.com\/2008\/11\/13\/mysql-explain-yourself\/\" rel=\"bookmark\">MySQL &ndash; EXPLAIN Yourself<\/a><\/li><li><a href=\"http:\/\/blog.theplanet.com\/2010\/05\/21\/unix-sysadmin-boot-camp-welcome-to-the-jungle\/\" rel=\"bookmark\">UNIX Sysadmin Boot Camp: Welcome to the Jungle<\/a><\/li><li><a href=\"http:\/\/blog.theplanet.com\/2010\/05\/18\/mirroring-server-content-and-configuration-in-iis7\/\" rel=\"bookmark\">Mirroring Server Content and Configuration in IIS7<\/a><\/li><\/ul><\/div><p>\t<a rel=\"nofollow\" href=\"http:\/\/www.stumbleupon.com\/submit?url=http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F&amp;title=UNIX%20Sysadmin%20Boot%20Camp%3A%20SSH\" title=\"StumbleUpon\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/e7ed8_stumbleupon.png\" alt=\"StumbleUpon\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><br>\t<a rel=\"nofollow\" href=\"http:\/\/twitter.com\/home?status=UNIX%20Sysadmin%20Boot%20Camp%3A%20SSH%20-%20http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F\" title=\"Twitter\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/665d9_twitter.png\" alt=\"Twitter\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><br>\t<a rel=\"nofollow\" href=\"http:\/\/www.dzone.com\/links\/add.html?url=http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F&amp;title=UNIX%20Sysadmin%20Boot%20Camp%3A%20SSH\" title=\"DZone\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/665d9_dzone.png\" alt=\"DZone\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><br>\t<a rel=\"nofollow\" href=\"http:\/\/digg.com\/submit?phase=2&amp;url=http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F&amp;title=UNIX%20Sysadmin%20Boot%20Camp%3A%20SSH&amp;bodytext=You%27ve%20had%20the%20weekend%20to%20mentally%20prepare%20yourself%20for%20the%20first%20%22workout%22%20in%20our%20UNIX%20Sysadmin%20Boot%20Camp%2C%20so%20now%20that%20you%27ve%20finished%20stretching%20your%20hammies%2C%20we%27ll%20jump%20right%20into%20training.%20In%20Welcome%20to%20the%20Jungle%2C%20I%20talked%20about%20the%20command%20line\" title=\"Digg\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/665d9_digg.png\" alt=\"Digg\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><br>\t<a rel=\"nofollow\" href=\"http:\/\/delicious.com\/post?url=http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F&amp;title=UNIX%20Sysadmin%20Boot%20Camp%3A%20SSH&amp;notes=You%27ve%20had%20the%20weekend%20to%20mentally%20prepare%20yourself%20for%20the%20first%20%22workout%22%20in%20our%20UNIX%20Sysadmin%20Boot%20Camp%2C%20so%20now%20that%20you%27ve%20finished%20stretching%20your%20hammies%2C%20we%27ll%20jump%20right%20into%20training.%20In%20Welcome%20to%20the%20Jungle%2C%20I%20talked%20about%20the%20command%20line\" title=\"del.icio.us\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/665d9_delicious.png\" alt=\"del.icio.us\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><br>\t<a rel=\"nofollow\" href=\"http:\/\/technorati.com\/faves?add=http%3A%2F%2Fblog.theplanet.com%2F2010%2F05%2F24%2Funix-sysadmin-boot-camp-ssh%2F\" title=\"Technorati\"><img decoding=\"async\" src=\"http:\/\/euvolution.com\/futurist-transhuman-news-blog\/wp-content\/plugins\/wp-o-matic\/cache\/665d9_technorati.png\" alt=\"Technorati\" class=\"sociable-hovers\" style=\"padding-left:10px; padding-right: 10px;\"><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>You&rsquo;ve had the weekend to mentally prepare yourself for the first &ldquo;workout&rdquo; in our UNIX Sysadmin Boot Camp, so now that you&rsquo;ve finished stretching your hammies, we&rsquo;ll jump right into training. In Welcome to the Jungle, I talked about the &hellip; <a href=\"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/planetology\/unix-sysadmin-boot-camp-ssh.php\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"limit_modified_date":"","last_modified_date":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[34],"tags":[],"class_list":["post-18978","post","type-post","status-publish","format-standard","hentry","category-planetology"],"modified_by":null,"_links":{"self":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/18978"}],"collection":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/comments?post=18978"}],"version-history":[{"count":0,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/18978\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/media?parent=18978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/categories?post=18978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/tags?post=18978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}