{"id":436,"date":"2019-05-12T10:58:08","date_gmt":"2019-05-12T10:58:08","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/24x7serversupport-blog\/?p=436"},"modified":"2019-05-12T10:58:08","modified_gmt":"2019-05-12T10:58:08","slug":"execute-command-via-ssh-on-remote-box-and-output-on-local-machine","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/","title":{"rendered":"Execute command via SSH on remote box and output on local machine."},"content":{"rendered":"\n<p>How to execute command via SSH on remote machine and get output on local machine console.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><em>## SYNTAX<\/em>\n<strong>ssh<\/strong> <strong>[<\/strong>user<strong>]<\/strong><strong>@<\/strong><strong>[<\/strong>remote host<strong>]<\/strong> <strong>[<\/strong><strong>command<\/strong><strong>]<\/strong>\n&nbsp;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><em>## EXAMPLE<\/em>\n<strong>ssh<\/strong> test<strong>@<\/strong>10.10.101.1 <strong>df<\/strong> -h\n&nbsp;\ntest<strong>@<\/strong> 10.10.101.1 's password: \nFilesystem                             Size  Used Avail Use% Mounted on\n\/dev\/mapper\/td--VG1-td--LV2            443G   89G  332G  22% \/\nudev                                   993M  4.0K  993M   1% \/dev\ntmpfs                                  401M  628K  401M   1% \/run\nnone                                   5.0M     0  5.0M   0% \/run\/lock\nnone                                  1002M     0 1002M   0% \/run\/shm\n\/dev\/sda1                              241M   38M  191M  17% \/boot<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to execute command via SSH on remote machine and get output on local machine console. ## SYNTAX ssh [user]@[remote host] [command] &nbsp; ## EXAMPLE ssh test@10.10.101.1 df -h &nbsp; test@ 10.10.101.1 &#8216;s password: Filesystem Size Used Avail Use% Mounted on \/dev\/mapper\/td&#8211;VG1-td&#8211;LV2 443G 89G 332G 22% \/ udev 993M 4.0K 993M 1% \/dev tmpfs 401M [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[30,38,34],"tags":[31,79,74,82,83],"class_list":["post-436","post","type-post","status-publish","format-standard","hentry","category-centos","category-cloudlinux","category-linux","tag-centos","tag-centos6","tag-centos7","tag-ssh","tag-ubuntu"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to execute command via SSH on remote box and get output on local machine<\/title>\n<meta name=\"description\" content=\"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to execute command via SSH on remote box and get output on local machine\" \/>\n<meta property=\"og:description\" content=\"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-12T10:58:08+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/\",\"name\":\"How to execute command via SSH on remote box and get output on local machine\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2019-05-12T10:58:08+00:00\",\"dateModified\":\"2019-05-12T10:58:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"description\":\"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Execute command via SSH on remote box and output on local machine.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to execute command via SSH on remote box and get output on local machine","description":"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/","og_locale":"en_US","og_type":"article","og_title":"How to execute command via SSH on remote box and get output on local machine","og_description":"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.","og_url":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/","og_site_name":"24x7serversupport Blog","article_published_time":"2019-05-12T10:58:08+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/","url":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/","name":"How to execute command via SSH on remote box and get output on local machine","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2019-05-12T10:58:08+00:00","dateModified":"2019-05-12T10:58:08+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"description":"How to execute command via SSH on remote box and output on local machine, Command to get the remote box output on local machine.","breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/execute-command-via-ssh-on-remote-box-and-output-on-local-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Execute command via SSH on remote box and output on local machine."}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=436"}],"version-history":[{"count":0,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/436\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}