<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jumphost - Architect the cloud</title>
	<atom:link href="https://blog.slepcevic.net/tag/jumphost/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.slepcevic.net</link>
	<description></description>
	<lastBuildDate>Tue, 22 Aug 2023 08:55:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute – part 2</title>
		<link>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-2/</link>
					<comments>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-2/#respond</comments>
		
		<dc:creator><![CDATA[Alesandro Slepčević]]></dc:creator>
		<pubDate>Wed, 21 Jun 2023 11:15:44 +0000</pubDate>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Akamai Connected Cloud]]></category>
		<category><![CDATA[Cockpit]]></category>
		<category><![CDATA[Jumphost]]></category>
		<category><![CDATA[Linode]]></category>
		<guid isPermaLink="false">http://172.233.40.105/blog.slepcevic.net/?p=28</guid>

					<description><![CDATA[<p>In previous post, we deployed our Cockpit server which we will use as a jump host/tunnel. For us to actually start using the solution, we need to do a few things: Creating users Creating users is extremely easy doing Cockpit;...</p>
<p>The post <a href="https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-2/">Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute – part 2</a> first appeared on <a href="https://blog.slepcevic.net">Architect the cloud</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>In previous <a href="https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/" target="_blank" rel="noreferrer noopener">post</a>, we deployed our Cockpit server which we will use as a jump host/tunnel. </p>



<p>For us to actually start using the solution, we need to do a few things: </p>



<ol class="wp-block-list">
<li>Create the users</li>



<li>Create or import SSH keys &amp; configure 2FA using Google Authenticator</li>



<li>Configure network and firewalls around our jumphost and rest of the infrastructure</li>



<li>Connect</li>
</ol>



<h2 class="wp-block-heading">Creating users</h2>



<p>Creating users is extremely easy doing Cockpit; on top of that, it gives the users to self manage their keys and 2FA configuration. </p>



<ol class="wp-block-list">
<li>Go to the URL or IP of the Cockpit server you just deployed and log in using the credentials you&#8217;ve configured in your StackScript. </li>



<li>On the left hand side, click the &#8220;Account&#8221; menu option and then on &#8220;Create new account&#8221; button</li>



<li>Enter the user details and press &#8220;Create button&#8221;.</li>
</ol>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="976" height="615" src="https://blog.slepcevic.net/wp-content/uploads/2023/06/Screenshot-2023-06-21-115101.png" alt="" class="wp-image-126" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/06/Screenshot-2023-06-21-115101.png 976w, https://blog.slepcevic.net/wp-content/uploads/2023/06/Screenshot-2023-06-21-115101-300x189.png 300w, https://blog.slepcevic.net/wp-content/uploads/2023/06/Screenshot-2023-06-21-115101-768x484.png 768w" sizes="(max-width: 976px) 100vw, 976px" /></figure>



<p></p>



<p>After the user(s) has been successfully created, let&#8217;s switch to the user&#8217;s point of view and see how rest of the onboarding process looks like. </p>



<ol class="wp-block-list">
<li>Log in with the user&#8217;s credential we&#8217;ve just created and navigate to &#8220;Terminal&#8221; option. </li>



<li>Once there, type in: google-authenticator and press enter. This will start the process of configuring your 2FA authentication</li>



<li>You are free to modify the authentication behavior, just make sure to save the authenticator file when the wizard asks you to do so. </li>
</ol>



<figure class="wp-block-image size-full"><img decoding="async" width="851" height="638" src="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115834.png" alt="" class="wp-image-135" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115834.png 851w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115834-300x225.png 300w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115834-768x576.png 768w" sizes="(max-width: 851px) 100vw, 851px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="797" src="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115900-1024x797.png" alt="" class="wp-image-136" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115900-1024x797.png 1024w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115900-300x233.png 300w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115900-768x597.png 768w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115900.png 1220w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As a final step, we just need to upload our SSH public key and we&#8217;re all set to start securely connecting to our infrastructure. </p>



<p>Entire procedure is really straight forward; go to &#8220;Accounts&#8221;, click on your username, and on the right hand side, under the &#8220;SSH Keys&#8221; section, click the &#8220;+&#8221; button. Paste you PUBLIC ssh key and click &#8220;Add Key&#8221; button. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="514" src="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115551-1024x514.png" alt="" class="wp-image-134" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115551-1024x514.png 1024w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115551-300x151.png 300w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115551-768x386.png 768w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115551.png 1219w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="665" height="425" src="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115459.png" alt="" class="wp-image-133" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115459.png 665w, https://blog.slepcevic.net/wp-content/uploads/2023/03/Screenshot-2023-06-21-115459-300x192.png 300w" sizes="auto, (max-width: 665px) 100vw, 665px" /></figure>



<p>That&#8217;s it! You&#8217;re done! In the upcoming blog posts, I&#8217;ll talk how to configure your local machine to connect to your infrastructure, how to secure the infrastructure you&#8217;re connecting to, and finally, how can we make this solution highly available. </p>



<p></p>



<p>Cheers, Alex. </p><p>The post <a href="https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-2/">Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute – part 2</a> first appeared on <a href="https://blog.slepcevic.net">Architect the cloud</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute &#8211; part 1</title>
		<link>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/</link>
					<comments>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/#respond</comments>
		
		<dc:creator><![CDATA[Alesandro Slepčević]]></dc:creator>
		<pubDate>Tue, 28 Mar 2023 08:43:49 +0000</pubDate>
				<category><![CDATA[Akamai Connected Cloud]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Cockpit]]></category>
		<category><![CDATA[Jumphost]]></category>
		<category><![CDATA[Linode]]></category>
		<guid isPermaLink="false">http://172.233.40.105/blog.slepcevic.net/?p=5</guid>

					<description><![CDATA[<p>First, let&#8217;s start by defining what a &#8220;jumphost&#8221; is. Jumphost is nothing more than a server or a collection of servers whose only purpose is to provide a single entry point to different segments of your infrastructure. A typical configuration...</p>
<p>The post <a href="https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/">Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute – part 1</a> first appeared on <a href="https://blog.slepcevic.net">Architect the cloud</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>First, let&#8217;s start by defining what a &#8220;jumphost&#8221; is.</strong></p>



<p>Jumphost is nothing more than a server or a collection of servers whose only purpose is to provide a single entry point to different segments of your infrastructure.</p>



<p>A typical configuration is a hardened Unix (or Unix-like) machine configured with SSH and a local firewall.&nbsp; An administrator connects to a target machine in the DMZ by making an SSH connection from the administrator&#8217;s personal computer to the jump server and then using SSH forwarding to access the target machine.&nbsp; </p>



<p>Using SSH port forwarding or a SSH-based tunnel to the target host allows the use of insecure protocols to manage servers without creating special firewall rules or exposing the traffic on the inside network.</p>



<p><strong>Software components used:</strong></p>



<ul class="wp-block-list">
<li> Cockpit web interface for server and user management</li>
</ul>



<ul class="wp-block-list">
<li>Google Authenticator plugin</li>
</ul>



<ul class="wp-block-list">
<li><em>Yubikey (optional) &#8211; not covered in this article</em></li>
</ul>



<ul class="wp-block-list">
<li>Termius as our SSH client (any SSH client which supports 2FA will work as well)&nbsp;</li>
</ul>



<p>&nbsp;</p>



<p><strong>Akamai Connected Cloud Compute components used:</strong></p>



<ul class="wp-block-list">
<li>1 x Nanode for jumphost</li>
</ul>



<ul class="wp-block-list">
<li> Some server or service deployed. In this example, I&#8217;ll be using MySQL database.</li>
</ul>



<ul class="wp-block-list">
<li> Linode Firewall</li>
</ul>



<ul class="wp-block-list">
<li>VLAN (optional)</li>
</ul>



<p></p>



<p><strong>What will you need?</strong></p>



<ul class="wp-block-list">
<li>Phone with Google Authenticator app installed</li>
</ul>



<ul class="wp-block-list">
<li>SSH private and public key.</li>
</ul>



<p></p>



<p><strong>How does it work?</strong></p>



<p>In a nutshell, this approach is nothing more than a 2FA enabled SSH tunnel.</p>



<p>Benefits of using this approach is that we can create a tunnel between absolutely any service which talks TCP.&nbsp;</p>



<p>Website &#8211; check, database server &#8211; check, ssh protocol &#8211; check, Redis &#8211; check&#8230;.you get the gist <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &nbsp;</p>



<p><strong>What is Cockpit?</strong> <a rel="noreferrer noopener" href="https://cockpit-project.org/" target="_blank">Cockpit</a> is a web-based graphical interface for servers, intended for everyone, especially those who are:&nbsp;</p>



<ul class="wp-block-list">
<li>new to Linux (including Windows admins)</li>
</ul>



<ul class="wp-block-list">
<li>familiar with Linux and want an easy, graphical way to administer servers</li>
</ul>



<ul class="wp-block-list">
<li>expert admins who mainly use other tools but want an overview on individual systems</li>
</ul>



<p></p>



<p><strong>How to get it up and running?</strong></p>



<p>Easiest way is to use a provided StackScript.</p>



<pre class="wp-block-code"><code>#!/bin/bash
#&lt;UDF name="HOSTNAME" label="The hostname for the new Linode."&gt;
# HOSTNAME=
#&lt;UDF name="MANAGEMENTUSER" label="Cockpit Management user." default="CockpitMGR"&gt;
# MANAGEMENTUSER=
#&lt;UDF name="MANAGEMENTUSERPASSWORD" label="Cockpit management user password." default="ReplaceMeN0w!"&gt;
# MANAGEMENTUSERPASSWORD=
yum update -y
yum install cockpit nano wget cockpit-dashboard cockpit-packagekit bind-utils -y
systemctl enable --now cockpit.socket
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh epel-release-latest-7.noarch.rpm
yum install google-authenticator -y
#Create user
pass=$(echo $MANAGEMENTUSERPASSWORD | openssl passwd -crypt -stdin)
useradd -m -p $pass $MANAGEMENTUSER
usermod -aG wheel $MANAGEMENTUSER  
#Configure hostname SSH &amp; PAM modules
hostnamectl set-hostname $HOSTNAME
sed -i '/preserve_hostname: false/c\preserve_hostname: true' /etc/cloud/cloud.cfg
sed -i '2s/^/auth required pam_google_authenticator.so\n/' /etc/pam.d/sshd
sed -i '2s/^/auth &#091;success=done default=ignore] pam_access.so accessfile=/etc/security/access-local.conf\n/' /etc/pam.d/sshd
sed -i '/auth   substack password-auth/c\#auth   substack password-auth' /etc/pam.d/sshd
echo 'auth required pam_google_authenticator.so nullok' &gt;&gt; /etc/pam.d/cockpit
echo 'idmsync ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
echo 'AuthenticationMethods publickey,keyboard-interactive' &gt;&gt; /etc/ssh/sshd_config
sed -i '/ChallengeResponseAuthentication no/c\ChallengeResponseAuthentication yes' /etc/ssh/sshd_config
sed -i '/SELINUX=enforcing/c\SELINUX=disabled' /etc/selinux/config
service sshd restart
#Branding stuff
#Other stuff
systemctl start NetworkManager.service
systemctl start cockpit
systemctl enable NetworkManager.service
firewall-cmd --zone=public --add-port=9090/tcp --permanent
firewall-cmd --reload 
shutdown -r now</code></pre>



<p>You will be prompted to enter Cockpit management username, password and a root password for your server.&nbsp; &nbsp;</p>



<p>Create a new StackScript in Cloud Manager using the script below, select <strong>Centos 7</strong> as a target image, give it a name, save it and press &#8220;Deploy a new Linode&#8221; button.</p>



<p></p>



<p>Give it a few minutes, visit the following URL: <strong>https://IP_OF_YOUR_LINODE:9090</strong> and you will be greeted with a Cockpit login screen which should look something like this.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="611" src="https://blog.slepcevic.net/wp-content/uploads/2023/03/cockpit-1024x611.png" alt="" class="wp-image-55" srcset="https://blog.slepcevic.net/wp-content/uploads/2023/03/cockpit-1024x611.png 1024w, https://blog.slepcevic.net/wp-content/uploads/2023/03/cockpit-300x179.png 300w, https://blog.slepcevic.net/wp-content/uploads/2023/03/cockpit-768x458.png 768w, https://blog.slepcevic.net/wp-content/uploads/2023/03/cockpit.png 1451w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In part two we will cover the process of creating users and their 2FA authentication. </p><p>The post <a href="https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/">Installing and configuring 2FA enabled web managed access solution (jumphost) to any infrastructure deployed on Akamai Connected Cloud Compute – part 1</a> first appeared on <a href="https://blog.slepcevic.net">Architect the cloud</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.slepcevic.net/installing-and-configuring-2fa-enabled-web-managed-access-solution-jumphost-to-any-infrastructure-deployed-on-akamai-connected-cloud-compute-part-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: blog.slepcevic.net @ 2025-12-26 16:55:05 by W3 Total Cache
-->