{"id":410,"date":"2023-01-05T14:43:06","date_gmt":"2023-01-05T14:43:06","guid":{"rendered":"https:\/\/computeoncloud.eu\/?p=410"},"modified":"2023-01-05T14:43:10","modified_gmt":"2023-01-05T14:43:10","slug":"wrapper-over-aws-session-manager-to-ssh-using-public-private-ip","status":"publish","type":"post","link":"https:\/\/computeoncloud.eu\/index.php\/2023\/01\/05\/wrapper-over-aws-session-manager-to-ssh-using-public-private-ip\/","title":{"rendered":"Wrapper over AWS Session Manager to SSH using Public\/Private IP"},"content":{"rendered":"\n<p>Previously on AWS, we had two problems with establishing SSH sessions to EC2 instances.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>It&#8217;s hard to manage SSH keys, especially if when we have a lot of servers.<\/li>\n\n\n\n<li>It was hard to open sessions to private instances as you need the bastion host to do so.<\/li>\n<\/ol>\n\n\n\n<p>AWS Session Manager solved both of these issues for us. Moreover, it is an AWS-centric solution so we preferred it.<\/p>\n\n\n\n<p>Moreover, we needed a way to establish an SSH connection to instances using public IP or private IP as we were doing ssh using IPs before. AWS CLI doesn&#8217;t support it out of the box (it supports only instance-id). I wrote this wrapper script over AWS CLI to achieve the same.<\/p>\n\n\n\n<p>Repository link:&nbsp;<a href=\"https:\/\/github.com\/MrHassanMurtaza\/ec2-ssh\/\">https:\/\/github.com\/MrHassanMurtaza\/ec2-ssh\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously on AWS, we had two problems with establishing SSH sessions to EC2 instances. AWS Session Manager solved both of these issues for us. Moreover, it is an AWS-centric solution so we preferred it. Moreover, we needed a way to establish an SSH connection to instances using public IP or private IP as we were &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/computeoncloud.eu\/index.php\/2023\/01\/05\/wrapper-over-aws-session-manager-to-ssh-using-public-private-ip\/\"> <span class=\"screen-reader-text\">Wrapper over AWS Session Manager to SSH using Public\/Private IP<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,14,13],"tags":[],"class_list":["post-410","post","type-post","status-publish","format-standard","hentry","category-aws","category-ec2","category-ssm"],"_links":{"self":[{"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/posts\/410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/comments?post=410"}],"version-history":[{"count":1,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/posts\/410\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/posts\/410\/revisions\/411"}],"wp:attachment":[{"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/media?parent=410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/categories?post=410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computeoncloud.eu\/index.php\/wp-json\/wp\/v2\/tags?post=410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}