{"id":35,"date":"2010-11-13T11:11:00","date_gmt":"2010-11-13T11:11:00","guid":{"rendered":"https:\/\/www.srivittal.com\/wp\/?p=35"},"modified":"2021-08-31T10:12:45","modified_gmt":"2021-08-31T09:12:45","slug":"problem-running-bash-scripts-during-ssh","status":"publish","type":"post","link":"https:\/\/www.srivittal.com\/wp\/?p=35","title":{"rendered":"problem running bash scripts during ssh"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">Well, this is a simple lack of understanding how interactive and non-interactive logins work in Unix. I added some script lines to the .bash_profile file on my CentOS box and found that these were not getting applied when I ssh&#8217;ed to that machine remotely. ssh uses a non-interactive login. Only interactive logins look at the .bash_profile file. .bashrc file gets invoked during non-interactive logins. As soon as I moved the steps to the .bashrc file, voila my lines were working beautifully.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Well, this is a simple lack of understanding how interactive and non-interactive logins work in Unix. I added some script lines to the .bash_profile file on my CentOS box and found that these were not getting applied when I ssh&#8217;ed to that machine remotely. ssh uses a non-interactive login. Only interactive logins look at the &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,31,61,60,32],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux","category-profile","category-shell","category-unix","entry entry-center"],"_links":{"self":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":1,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}