<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Kazuhira</author_name>
  <author_url>https://blog.hatena.ne.jp/Kazuhira/</author_url>
  <blog_title>CLOVER🍀</blog_title>
  <blog_url>https://kazuhira-r.hatenablog.com/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>これは、なにをしたくて書いたもの？ 現在のシェルがSSHでリモートログインして起動したものかどうか、判定する方法はないのかな？と思って調べてみたのですが。 SSH_CONNECTIONという環境変数が設定されているかを見ればよいみたいです。 SSH_CONNECTION環境変数 sshコマンドのmanページに記載がありました。 SSH_CONNECTION環境変数には、クライアントとサーバーを識別する値が格納されます。具体的にはクライアントのIPアドレス、 ポート、サーバーのIPアドレス、ポートです。 SSH_CONNECTION Identifies the client and serve…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkazuhira-r.hatenablog.com%2Fentry%2F2023%2F01%2F05%2F235018&quot; title=&quot;SSHでログインしていることを判定するには、SSH_CONNECTION環境変数を見ればよいという話 - CLOVER🍀&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-05 23:50:18</published>
  <title>SSHでログインしていることを判定するには、SSH_CONNECTION環境変数を見ればよいという話</title>
  <type>rich</type>
  <url>https://kazuhira-r.hatenablog.com/entry/2023/01/05/235018</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
