<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>posturan</author_name>
  <author_url>https://blog.hatena.ne.jp/posturan/</author_url>
  <blog_title>Oboe吹きプログラマの黙示録</blog_title>
  <blog_url>https://oboe2uran.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>paramiko で対話式を処理するにはどうしたら良いのか？ paramiko-pexpect とかを使えば良いのかもしれないが、invoke_shell() 、シェルとして実行する方法で 踏み台の先の telnet 接続してコマンドを流す方法を考えた。以下の例は最初のSSH接続の後、もう１台 SSH で踏み台に入り、そこで telnet でコマンド実行するサンプルまずは、最後に使う telnet 接続してコマンド実行するためのクラス・メソッドの定義 expectshell.py # -*- coding: utf-8 -*- import re class ExpectShell: def …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foboe2uran.hatenablog.com%2Fentry%2F2021%2F10%2F09%2F003000&quot; title=&quot;paramiko で対話式の処理 - Oboe吹きプログラマの黙示録&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>2021-10-09 00:30:00</published>
  <title>paramiko で対話式の処理</title>
  <type>rich</type>
  <url>https://oboe2uran.hatenablog.com/entry/2021/10/09/003000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
