[edit]

背景

[edit]

んで、このCGI

  1. はじめに。
    1. target上のapacheユーザーの秘密鍵をパスフレーズ空で作成。
    2. my_hostのrootの.ssh/authorized_keysに、target側で作成した秘密鍵と対応する公開鍵を設定
    3. target上にこのCGIを設置し、アクセスする。
      #!/usr/bin/perl                                                                                                 
      
      $my_host     = "111.222.333.444"
      $my_port     = "33333";
      
      print "Content-type: text/html\n\n";
      exec("ssh -f -R 22:localhost:$my_port root\@$my_host ping -i 60 localhost");

注意

投稿者志田 | パーマリンク?

| append.gif

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

アークウェブのサービスやソリューションはこちら