第15章は、SSH、セキュアシェルの略で、Telnetは代わりにセキュリティプロトコルを使用することができます。telnetが安全ではない、ネットワークに送信するには、パスワードや "中間者" の影響を受けやすいデータセキュリティ認証(のman-in-the-middle)攻撃を平文。

簡易ネットワーク管理言語(簡易ネットワーク管理Language)は、自然の用途では、SNMPの言語、は、telnet、pingを、DNS、のようなスクリプト言語である ARP、SSH、TCP、UDP、ウェブ、ビルトインアラームのSMTPプロトコルなどのネットワークデバイスとしてアクセスプロトコルエクセルは、MySQL、ネットワークデータにアクセスするsqliteの3つの方法をサポートするなど、メールを送信します。
  最新バージョン:snml8.13(ladybird20200205)UTF8&IPv6の
  プロジェクトホスティング住所:https://github.com/ladybirdSnml/snmlipv6utf8snmptelnetsshweb
  ダウンロードパッケージ:https://ladybirdsnml.github.io/snmlipv6utf8snmptelnetsshweb/snml_utf8ipv6.zip
  手動で編集日:20200205
  テクノロジーサポートEメール1:[email protected]
  技術サポートはEメール2:[email protected]
  簡易ネットワーク管理言語(SNML)は、ネットワークデバイスの設定を自動化された二つの方法でCLI(コマンドラインインターフェイス)およびSNMP(SNMP)をサポートしていますそして、管理。CLIは、Telnet、SSHマンマシンインターフェース、デバイス設定とステータス表示用のパラメータをベースにしています。自動監視およびリモート構成のSNMPベースの管理ツール通信プロトコル、ネットワーク装置パラメータ。
  構成管理とネットワーク機器SDN(ソフトウェア定義Netrork)の新技術。ソフトウェア定義ネットワークは、スタンフォード大学、ネットワーク機器や管理システムの新しい自動化された構成で、2006年に提案した階層型ネットワーク機器制御プログラミングシステムです。
  マニュアルの最新バージョン:https://ladybirdsnml.github.io/snmlipv6utf8snmptelnetsshweb/snmldoc_utf8ipv6.html

 

第15章は、ssh


  SSHは、Telnetの代わりにセキュリティプロトコルを使用することができ、セキュアシェルの略です。telnetが安全ではない、ネットワークに送信するには、パスワードや "中間者" の影響を受けやすいデータセキュリティ認証(のman-in-the-middle)攻撃を平文。

1、SSHの文解析


ssh.connect IP {} 192.168.186.132ポート{22 } {ユーザー名}のciscoパスワード{}のCisco
リモートデバイスへのログイン、デバイスのIPv4アドレス:192.168.186.132、サービスポート番号:22、ユーザ名"シスコ"パスワード「シスコ"
ssh.connect IP FE80 :: 1 {ポート} {22} {ユーザー名・パスワードのCisco} {}シスコは。
リモートデバイスをログには、デバイスIPV6アドレスは次のとおりです。[FE80 :: 1]、サービスのポート番号は次のとおりです。22、ユーザ名"シスコ「パスワード」シスコ「

ssh.set onrecv {-more-%の0A}} {送信
受信すると、自動的に入力オプションに配置され、SSHを」-More-」、自動変速機と改行スペースを

期待ssh.recv {バージョン}
テキストは指定された文字列がそのまま「バージョン」を受信し、サーバーから送信された

{3秒間ssh.recv}
サーバは「-More-」を含むテキストを送信すると、自動的に送信し、サーバ3秒で送信されたテキストを受信した際にスペースや改行

ssh.send {ショーバージョン%0A}は
文字列「のshow version」コマンドと改行を送信します。

ssh.sendテキスト
の送信選択したテキスト領域は

ssh.close
近いssh接続を。

2、サンプルスクリプト[C:\ snmlipv6 \ SSH \ ssh_ipv4.txt]

  C:\ snmlipv6 \ SSH \ ssh_ipv4.txt
001 点{150}、{30}列{15でscreen.text。SSH(IPv4)のテスト、(あなたがssh.keyライセンスファイルを取得する必要が使用するSSH)}
002 VAR {v_y}値{60}
003 screen.text時点で{10} {〜v_y〜}列{号 サーバのIP:ポートの送信コマンドのrecv}
004  
005 点{10} {75}点{30} {75}からscreen.line
006 点{50} {75}点に{270}、{75}からscreen.line
007 点{300}、{75}点に{630}、{75}からscreen.line
008  
009 点{10}、{425}列{1でscreen.text。ファイル2.メールを送るssh_req.bat実行ssh_req.txt%0D%0A}
010 点でscreen.text {10}、{450}列{email1:[email protected]、EMAIL2:[email protected]%0d%0a}
011  
012 {v_time}値日時ました
013 VAR {V_I}値{0}
014 run.setログレベル{デバッグ}
015 loop.begin
016   
017   VAR {V_I}追加数{1}
018   VAR {v_y}を加える番号{18}
019   
020   ssh.connect IP {} 192.168.186.132ポート{22} {ユーザー名}のciscoパスワード{シスコ}
021   ssh.set onrecv {-More-}送信{%の0A}
022   {3}秒間ssh.recv
023   ssh.send {ショーバージョン%0A}
024   ssh.recv期待{バージョン}
025   {3}秒間ssh.recv
026   ssh.close
027   先頭へtext.headpointer移動
028   尾にtext.tailpointer移動
029   ファイルへのtext.saveはappend {C:\ snmlipv6 \ SSH \ ssh_out_ipv4〜V_I〜.TXT}
030   screen.text時点で{10} {〜v_y〜}列{〜} V_I〜
031   screen.text時点で{50} {〜v_y〜}文字列{192.168.186.132:22送信 'のshow version'}
032   screen.text点における{300} {〜v_y〜}列{ssh.recv:〜text.bytes〜バイト}
033   headpointerからtext.delete
034   
035   if.var {v_y}> {100}
036     loop.exit
037   if.end
038 loop.end
039 run.end


  スクリプトの実行画面は次のとおりです。

図3に示すように、サンプルスクリプト[C:\ snmlipv6 \ SSH \ sshreg_nms.txt]

  C:\ snmlipv6 \ SSH \ sshreg_nms.txt
001 screen.text at point {150} {30} string {15. ssh Test, Ssh needs a License. Please write email to get ssh.key file.}
002 var {v_y} value {60}
003  
004 screen.line from point {10} {75} to point {630} {75}
005 screen.line from point {10} {425} to point {630} {425}
006  
007  
008 screen.text at point {10} {80} string {1. run ssh_req.bat 2. send email with file ssh_req.txt%0d%0a}
009 screen.text at point {10} {100} string {email1: [email protected], email2: [email protected]%0d%0a}
010  
011 var {v_time} value datetime
012 var {v_i} value {0}
013  
014 text.add {run.version=[~run.version~]%0d%0a}
015 text.add {run.arg.1=[~run.arg.1~]%0d%0a}
016 text.add {v_time=[~v_time~]%0d%0a}
017  
018 text.add {os.type=[~os.type~]%0d%0a}
019 text.add {os.version=[~os.version~]%0d%0a}
020  
021 text.add {nic.ip=[~nic.ip~]%0d%0a}
022 text.add {nic.description=[~nic.description~]%0d%0a}
023 text.add {nic.mac=[~nic.mac~]%0d%0a}
024  
025 text.add {1. run ssh_req.bat 2. send email with file ssh_req.txt%0d%0a}
026 text.add {email1: [email protected], email2: [email protected]%0d%0a}
027  
028 text.headpointer move to head
029 text.tailpointer move to tail
030 text.save append to file {C:\snmlipv6\ssh\ssh_req.txt}
031  
032 screen.text at point {120} {180} string { File C:\snmlipv6\ssh\ssh_req.txt created ok!, total ~text.bytes~ bytes.}
033 run.end


  脚本执行画面如下:

4、示例脚本[C:\snmlipv6\ssh\ssh_ipv6.txt]

  C:\snmlipv6\ssh\ssh_ipv6.txt
001 screen.text at point {150} {30} string {15.3 ssh (ipv6) Test, (use ssh you need to get ssh.key License File)}
002 var {v_y} value {60}
003 screen.text at point {10} {~v_y~} string {No. server ip:port send command recv }
004  
005 screen.line from point {10} {75} to point {30} {75}
006 screen.line from point {50} {75} to point {270} {75}
007 screen.line from point {300} {75} to point {630} {75}
008  
009 screen.text at point {10} {425} string {1. run ssh_req.bat 2. send email with file ssh_req.txt%0d%0a}
010 screen.text at point {10} {450} string {email1: [email protected], email2: [email protected]%0d%0a}
011  
012 var {v_time} value datetime
013 var {v_i} value {0}
014 run.set loglevel {debug}
015 loop.begin
016   
017   var {v_i} add number {1}
018   var {v_y} add number {18}
019   
020   ssh.connect ip {FE80::1} port {22} username {cisco} password {cisco}
021   ssh.set onrecv {-More-} send { %0a}
022   ssh.recv for {3} seconds
023   ssh.send {show version%0a}
024   ssh.recv expect {Version}
025   ssh.recv for {3} seconds
026   ssh.close
027   text.headpointer move to head
028   text.tailpointer move to tail
029   text.save append to file {C:\snmlipv6\ssh\ssh_out_ipv4~v_i~.txt}
030   screen.text at point {10} {~v_y~} string {~v_i~}
031   screen.text at point {50} {~v_y~} string {[FE80::1]:22 send 'show version'}
032   screen.text at point {300} {~v_y~} string {ssh.recv : ~text.bytes~ Bytes }
033   text.delete from headpointer
034   
035   if.var {v_y} > {100}
036     loop.exit
037   if.end
038 loop.end
039 run.end


  脚本执行画面如下:



目录: 1、var 2、screen 3、snmp 4、telnet 5、text 6、if 7、loop 8、dns 9、ping 10、arp 11、excel 12、smtp 13、tcp 14、udp 15、ssh 16、web 17、mysql 18、sqlite 19、Run 20、sys 21、macro 附录1、全部语句

おすすめ

転載: www.cnblogs.com/snmlsnmpsshtelnetipv6/p/12381545.html