jekyll build from Action e9bb986110
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose
|
||||
Copyright 2013-2020 Michael Rose - mademistakes.com | @mmistakes
|
||||
Free for personal and commercial use under the MIT license
|
||||
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
|
||||
-->
|
||||
<html lang="en" class="no-js">
|
||||
--><html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- begin _includes/seo.html --><title>SSH into Machine That Is Behind a Private Network - Şahin Akkaya’s Personal Page</title>
|
||||
@ -116,13 +116,17 @@
|
||||
/home/sahin/
|
||||
|
||||
</a>
|
||||
<ul class="visible-links"><li class="masthead__menu-item">
|
||||
<ul class="visible-links">
|
||||
<li class="masthead__menu-item">
|
||||
<a href="/">Home</a>
|
||||
</li><li class="masthead__menu-item">
|
||||
</li>
|
||||
<li class="masthead__menu-item">
|
||||
<a href="/about/">About</a>
|
||||
</li><li class="masthead__menu-item">
|
||||
</li>
|
||||
<li class="masthead__menu-item">
|
||||
<a href="/contact/">Contact</a>
|
||||
</li></ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<button class="search__toggle" type="button">
|
||||
<span class="visually-hidden">Toggle search</span>
|
||||
@ -185,7 +189,7 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://github.com/sahinakkayadev" rel="nofollow noopener noreferrer"><i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">sahinakkayadev</span></a></li>
|
||||
<li><a href="https://github.com/sahinakkaya" rel="nofollow noopener noreferrer"><i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">sahinakkayadev</span></a></li>
|
||||
|
||||
|
||||
|
||||
@ -326,7 +330,8 @@
|
||||
<p>There are tools like <a href="https://www.ngrok.com">ngrok</a>, <a href="localtunnel.me">localtunnel</a> which exposes your localhost to the internet and gives you a URL to access it but I did not want to use them.</p>
|
||||
<ul>
|
||||
<li>I did not want to use <code class="language-plaintext highlighter-rouge">ngrok</code> because it is not open source and it might have security issues. They are also charging you.</li>
|
||||
<li><code class="language-plaintext highlighter-rouge">localtunnel</code> seemed perfect. The code of both client and server is open. That is great news! But it did not last long because it is just forwarding http/https traffic :(</li>
|
||||
<li>
|
||||
<code class="language-plaintext highlighter-rouge">localtunnel</code> seemed perfect. The code of both client and server is open. That is great news! But it did not last long because it is just forwarding http/https traffic :(</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -339,7 +344,7 @@ ssh <span class="nt">-R</span> 7777:localhost:22 remote-user@remote.host
|
||||
</code></pre></div></div>
|
||||
<p>This command forwards all the incoming connections to port 7777 of remote machine to port 22 of our current machine. In order for this to work, you need to make sure <code class="language-plaintext highlighter-rouge">GatewayPorts</code> is set to <code class="language-plaintext highlighter-rouge">yes</code> in the remote server ssh configuration. It also assumes our current machine accepts ssh connections via port 22.</p>
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
<p>Now, go to any machine and connect to the remote server first. When we are connected, we will create another ssh connection to port 7777 to connect our home computer.</p>
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># another local machine (my laptop)</span>
|
||||
ssh remote-user@remote.host
|
||||
@ -372,16 +377,7 @@ ssh <span class="nt">-p</span> 7777 homeuser@localhost
|
||||
|
||||
</footer>
|
||||
|
||||
<section class="page__share">
|
||||
|
||||
|
||||
<a href="https://twitter.com/intent/tweet?text=SSH+into+Machine+That+Is+Behind+a+Private+Network%20https%3A%2F%2Fsahinakkaya.dev%2F2022%2F02%2F26%2Fssh-into-machine-that-is-behind-private-network.html" class="btn btn--twitter" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="Share on Twitter"><i class="fab fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
|
||||
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fsahinakkaya.dev%2F2022%2F02%2F26%2Fssh-into-machine-that-is-behind-private-network.html" class="btn btn--facebook" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="Share on Facebook"><i class="fab fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
|
||||
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fsahinakkaya.dev%2F2022%2F02%2F26%2Fssh-into-machine-that-is-behind-private-network.html" class="btn btn--linkedin" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="Share on LinkedIn"><i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="pagination">
|
||||
@ -448,7 +444,7 @@ ssh <span class="nt">-p</span> 7777 homeuser@localhost
|
||||
|
||||
|
||||
<p class="archive__item-excerpt" itemprop="description">trap them and kill them!
|
||||
</p>
|
||||
There is a beautiful command in Linux called trap which traps signals and let you run specific commands when they invoked. There is ...</p>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
@ -604,13 +600,15 @@ Last week, I received an email from Let’s Encrypt reminding me to renew my cer
|
||||
|
||||
|
||||
<div class="search-content">
|
||||
<div class="search-content__inner-wrap"><form class="search-content__form" onkeydown="return event.key != 'Enter';">
|
||||
<div class="search-content__inner-wrap">
|
||||
<form class="search-content__form" onkeydown="return event.key != 'Enter';">
|
||||
<label class="sr-only" for="search">
|
||||
Enter your search term...
|
||||
</label>
|
||||
<input type="search" id="search" class="search-input" tabindex="-1" placeholder="Enter your search term..." />
|
||||
<input type="search" id="search" class="search-input" tabindex="-1" placeholder="Enter your search term...">
|
||||
</form>
|
||||
<div id="results" class="results"></div></div>
|
||||
<div id="results" class="results"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -632,7 +630,7 @@ Last week, I received an email from Let’s Encrypt reminding me to renew my cer
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="page__footer-copyright">© 2023 Şahin Akkaya's Personal Page. Powered by <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
|
||||
<div class="page__footer-copyright">© 2023 Şahin Akkaya's Personal Page. Powered by <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
|
||||
<div class="page__footer-copyright">
|
||||
Check out the <a href="https://github.com/Asocia/sahinakkayadotdev">code</a> of this site.
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user