<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Ssh on Ingenboy.inc</title>
    <link>https://blog.ingenboy.com/tags/ssh/</link>
    <description>Recent content in Ssh on Ingenboy.inc</description>
    <image>
      <title>Ingenboy.inc</title>
      <url>https://blog.ingenboy.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.ingenboy.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.152.2</generator>
    <language>en</language>
    <lastBuildDate>Tue, 23 Jul 2024 09:10:07 +0900</lastBuildDate>
    <atom:link href="https://blog.ingenboy.com/tags/ssh/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Great_ssh</title>
      <link>https://blog.ingenboy.com/post/great_ssh/</link>
      <pubDate>Tue, 23 Jul 2024 09:10:07 +0900</pubDate>
      <guid>https://blog.ingenboy.com/post/great_ssh/</guid>
      <description>&lt;h1 id=&#34;背景&#34;&gt;背景&lt;/h1&gt;
&lt;p&gt;openVPNを使うことでsite2siteルーティングができるようになった。
しかし、そのネットワークに参加するためにはopenVPNで発行されるクライアント証明書が不可欠である。
それが面倒くさいという話だ。
実際のアプリではL7でのやり取りが多いから、L4まで権限は必要ない。
そこで、sshを使ってhttpレイヤーでトンネルを構築しようという話だ。&lt;/p&gt;
&lt;h1 id=&#34;もうチャットgpuにききますね&#34;&gt;もうチャットGPUにききますね&lt;/h1&gt;
&lt;p&gt;My Question&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;手元のラップトップー＞踏み台サーバー＞webサーバ

があったとします。

この時、webサーバの80番ポートでhttp通信を待ち受けているサーバがいます。

手元のラップトップー＞webサーバ

にアクセスしたいです。

やり方を教えてください。
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;chatgptの回答&#34;&gt;chatGPTの回答&lt;/h1&gt;
&lt;h2 id=&#34;結論&#34;&gt;結論&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ssh -L 8080:192.168.1.2:80 user@bastion.example.com
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;8080はローカルマシンのポート番号
192.168.1.2はWebサーバのIPアドレス
80はWebサーバのポート番号
userは踏み台サーバのユーザー名
bastion.example.comは踏み台サーバのホスト名またはIPアドレスです。
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;ssh--lオプションとはなんなのか&#34;&gt;ssh -Lオプションとはなんなのか？&lt;/h1&gt;
&lt;p&gt;これは後で調べます。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
