{"id":8342,"date":"2024-03-04T22:18:59","date_gmt":"2024-03-04T21:18:59","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=8342"},"modified":"2024-03-04T22:54:49","modified_gmt":"2024-03-04T21:54:49","slug":"ssh-run-remote-commands","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/ssh-run-remote-commands\/","title":{"rendered":"SSH Run remote commands"},"content":{"rendered":"\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"sh\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">ssh user@host 'bash -s' &lt; my_script.sh\n\n\n(cat &lt;&lt;END\ndf -h\ndate\nuptime\nuname -a\napt update &amp;&amp; apt upgrade -y &amp;&amp; apt autoremove -y\nEND\n) | ssh user@host 'bash -s'<\/pre><\/div>\n\n\n\n<p>See also:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-niels-kooiman wp-block-embed-niels-kooiman\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JcHeCBsJFX\"><a href=\"https:\/\/solidt.eu\/site\/how-to-create-a-lxd-container-with-your-ssh-key-in-it-and-with-ssh-server-in-the-container\/\">How to create a LXD Container with your ssh key in it (and with ssh server in the container)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to create a LXD Container with your ssh key in it (and with ssh server in the container)&#8221; &#8212; Niels Kooiman\" src=\"https:\/\/solidt.eu\/site\/how-to-create-a-lxd-container-with-your-ssh-key-in-it-and-with-ssh-server-in-the-container\/embed\/#?secret=pmGx5hdKfE#?secret=JcHeCBsJFX\" data-secret=\"JcHeCBsJFX\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>See also:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8342","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=8342"}],"version-history":[{"count":3,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8342\/revisions"}],"predecessor-version":[{"id":8356,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8342\/revisions\/8356"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=8342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=8342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=8342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}