運用コマンドレファレンス Vol.1
SSHサーバの運用状態のトレースログを表示します。
[入力形式]
show ssh logging [switch <switch no.>]
[入力モード]
一般ユーザモードおよび装置管理者モード
[パラメータ]
- switch <switch no.>
- スタックを構成している場合,指定したスイッチ番号のメンバスイッチに対してコマンドを実行します。本パラメータはスタック構成時のマスタスイッチで指定できます。指定できる値の範囲は,「パラメータに指定できる値」を参照してください。
- 本パラメータ省略時の動作
- 自装置に対してコマンドを実行します。
[スタック構成時の運用]
マスタスイッチからスタックを構成しているメンバスイッチのスイッチ番号を指定してコマンドを実行できます。
なお,remote commandコマンドも使用できます。
remote command {<switch no.> | all} show ssh logging
[実行例]
図8-9 SSHサーバのトレースログの表示
> show ssh logging Date 20XX/06/16 08:00:00 UTC 20XX/06/16 07:37:50 sshd[4409] Closing connection to 192.168.0.2 20XX/06/16 07:37:30 sshd[4409] Accepted password for staff from 192.168.0.2 port 4226 20XX/06/16 07:37:26 sshd[4409] Failed none for staff from 192.168.0.2 port 4226 20XX/06/16 07:37:22 sshd[4409] Connection from 192.168.0.2 port 4226 20XX/06/16 07:37:22 sshd[4409] Generating 768 bit RSA key. 20XX/06/16 07:37:22 sshd[4409] RSA key generation complete. 20XX/06/16 07:37:22 sshd[4409] Generating 768 bit RSA key. 20XX/06/16 07:37:15 sshd[11970] Closing connection to 192.168.0.1 20XX/06/16 07:37:15 sshd[11970] Connection closed by 192.168.0.1 20XX/06/16 07:36:59 sshd[11970] Accepted publickey for staff from 192.168.0.1 port 4225 ssh2 20XX/06/16 07:36:59 sshd[11970] Found matching RSA key: 14:a5:b4:9e:73:24:13:1d:b6:18:b2:a3:93: 93:ce:33 20XX/06/16 07:36:56 sshd[11970] Found matching RSA key: 14:a5:b4:9e:73:24:13:1d:b6:18:b2:a3:93: 93:ce:33 20XX/06/16 07:36:56 sshd[11970] Failed none for staff from 192.168.0.1 port 4225 ssh2 20XX/06/16 07:36:55 sshd[11970] Connection from 192.168.0.1 port 4225 20XX/06/16 07:36:55 sshd[11970] RSA key generation complete. 20XX/06/16 07:36:55 sshd[11970] Generating 768 bit RSA key. 20XX/06/15 16:51:52 sshd[4321] Closing connection to 192.168.0.1 on VRF 2 20XX/06/15 15:39:40 sshd[4321] Entering interactive session. 20XX/06/15 15:39:40 sshd[4321] Accepted password for staff from 192.168.0.1 port 64093 20XX/06/15 15:39:38 sshd[4321] Encryption type: 3des 20XX/06/15 15:39:38 sshd[4321] Sent 768 bit server key and 1024 bit host key. 20XX/06/15 15:39:38 sshd[4321] Connection from 192.168.0.1 port 64093 on VRF 2 20XX/06/15 15:39:38 sshd[4321] RSA key generation complete. 20XX/06/15 15:39:37 sshd[4321] Generating 768 bit RSA key.
[表示説明]
トレースログの表示形式を次に示します。
yyyy/mm/dd hh:mm:ss [プロセス番号] messsage 1 2 3
- 時刻:採取年,月,日,時,分,秒を表示します。
- プロセス番号:サーバのプロセス番号を表示します。
- メッセージ:トレースログのメッセージを表示します。
トレースログのメッセージと内容を次の表に示します。
表8-6 トレースログのメッセージと内容
メッセージ 内容 <authentication method> authentication disabled. <authentication method>は使用できません。
<authentication method>:認証方式[/usr]/home/<user>/.ssh/authorized_keys, line <number>: non ssh1 key syntax 登録されたユーザ公開鍵にSSHv1の公開鍵でないものがありました。SSHv1の公開鍵認証では使用されません。
<user>:ユーザ名
<number>:公開鍵ファイル内の行Accepted <authentication method> for <user> from <host> port <port> [ssh2] ユーザ認証に成功しました。
<authentication method>:認証方式
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
ssh2:SSHv2の場合に表示しますBad protocol version identification '<string>' from <host> <host>から不正なバージョン識別子を受信しました。
<string>:受信したバージョン識別子
<host>:リモートホストまたはUNKNOWNClient protocol version <version>; client software version <software version> クライアントのプロトコルバージョンとソフトウェアバージョンを表示します。
<version>:プロトコルバージョン
<software version>:ソフトウェアバージョンClosing connection to <host> [on VRF <vrf id>] <host>との接続を終了しました。
<host>:リモートホスト
<vrf id>:VRF ID(グローバルネットワークから接続する場合は表示されません)Connection closed by <host> <host>との接続が切れました。
<host>:リモートホストConnection from <host> port <port> [on VRF <vrf id>] <host>の<port>から接続されています。
<host>:リモートホスト
<port>:リモートホストのポート
<vrf id>:VRF ID(グローバルネットワークから接続する場合は表示されません)Could not write ident string to <host> <host>へバージョン識別子を送信できませんでした。
<host>:リモートホストDid not receive identification string from <host> <host>からバージョン識別子を受信できませんでした。
<host>:リモートホストDisabling protocol version 1. Could not load host key SSHv1ホスト鍵が読み込めませんでした。set ssh hostkeyコマンドでホスト鍵を再作成してください。 Disabling protocol version 2. Could not load host key SSHv2ホスト鍵が読み込めませんでした。set ssh hostkeyコマンドでホスト鍵を再作成してください。 Disconnecting: crc32 compensation attack: network attack detected CRC32攻撃を検知したため,切断しました。 Disconnecting: deattack denial of service detected DoS攻撃を検知したため,切断しました。 Disconnecting: Too many authentication failures for <user> <user>は何度も認証失敗したため,切断しました。
<user>:ユーザ名Encryption type: <cipher> 共通鍵暗号方式は<cipher>を使用します。
<cipher>:共通鍵暗号方式名Entering interactive session for SSH2. SSHv2のセッションを開始しました。 Entering interactive session. SSHv1のセッションを開始しました。 error: auth_rsa_verify_response: <reason> 公開鍵認証で使用するRSA鍵に異常があります。
<reason>:異常理由error: auth_rsa_verify_response: RSA modulus too small: <size> < minimum 512 bits 公開鍵認証で使用するRSA鍵長が小さ過ぎます。
<size>:鍵長error: buffer_get_bignum2_ret: <reason> 公開鍵に異常があります。
<reason>:異常理由error: buffer_get_ret: <reason> 公開鍵に異常があります。
<reason>:異常理由error: buffer_get_string_ret: <reason> 公開鍵に異常があります。
<reason>:異常理由error: Could not load host key: /config/ssh/ssh_host_dsa_key 本装置のホスト鍵が読み込みできませんでした。set ssh hostkeyコマンドでホスト鍵を再作成してください。 error: Could not load host key: /config/ssh/ssh_host_key 本装置のホスト鍵が読み込みできませんでした。set ssh hostkeyコマンドでホスト鍵を再作成してください。 error: key_from_blob: <reason> 公開鍵に異常があります。
<reason>:異常理由error: key_read: <reason> 公開鍵認証で使用する鍵に異常があります。
<reason>:異常理由(鍵内容など)error: key_read: key_from_blob <key> failed 公開鍵認証で使用する鍵に異常があります。
<key>:鍵内容error: key_read: uudecode <key> failed 公開鍵認証で使用する鍵に異常があります。
<key>:鍵内容error: RSA_public_decrypt failed: error: <reason> 公開鍵認証で使用するRSA鍵が長い(5120ビットを超える)など,異常があります。
<reason>:内部詳細情報Exec command '<command>' コマンドが実行されました。
<command>:コマンドFailed <authentication method> for [invalid user] <user> from <host> port <port> [ssh2] ユーザ認証に失敗しました。
<authentication method>:認証方式
invalid user:無効なユーザ名の場合に表示します
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
ssh2:SSHv2の場合に表示しますfatal: Login refused for too many sessions. SSHサーバへ接続中のセッションが多いため,接続を拒否しました。
接続元の端末を確認してください。不要なセッションは本装置のclear tcpコマンドで切断するか,接続タイムアウトで切断するのを待ってください。fatal: no matching cipher found: client <client ciphers> server <server ciphers> サーバとクライアントで適合する共通鍵暗号方式がありませんでした。
<client ciphers>:クライアント側の暗号方式リスト
<server ciphers>:サーバ側の暗号方式リストfatal: no matching mac found: client <client macs> server <server macs> サーバとクライアントで適合するメッセージ認証コード方式がありませんでした。
<client macs>:クライアント側のメッセージ認証コード方式リスト
<server macs>:サーバ側のメッセージ認証コード方式リストfatal: Read from socket failed: Connection reset by peer コネクションが切断されました。 fatal: Timeout before authentication for <host> ログイン認証がタイムアウトしました。
<host>:リモートホストfatal: Write failed: <reason> リモートホストに強制的に切断されました。
<reason>:切断理由fatal: Write failed: Broken pipe リモートホストに強制的に切断されました。 Found matching <key type> key: <fingerprint> 登録されているユーザ公開鍵が見つかりました。
<key type>:公開鍵の種類
<fingerprint>:公開鍵のフィンガープリントGenerating 768 bit RSA key. RSAサーバ鍵を生成しています。 Invalid user <user> from <host> <user>は無効です。ログインできません。
<user>:ユーザ名
<host>:リモートホストkex: client->server <cipher> <mac> <compression> クライアントからサーバへ鍵交換ネゴシエーションしています。
<cipher>:共通鍵暗号方式名
<mac>:メッセージ認証コード方式名
<compression>:圧縮方式名kex: server->client <cipher> <mac> <compression> サーバからクライアントへ鍵交換ネゴシエーションしています。
<cipher>:共通鍵暗号方式名
<mac>:メッセージ認証コード方式名
<compression>:圧縮方式名Postponed <authentication method> for [invalid user] <user> from <host> port <port> [ssh2] ユーザ認証を延期しました。
<authentication method>:認証方式
invalid user:無効なユーザ名の場合に表示します
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
ssh2:SSHv2の場合に表示しますprobed from <host> with <id>. Don't panic. <host>から<id>で探索されましたが問題ありません。
<host>:リモートホスト
<id>:バージョン識別子Protocol major versions differ for <host>: <server id> vs. <client id> <host>とのSSHプロトコルバージョンが<server id>と<client id>で異なります。
<host>:リモートホスト
<server id>:サーババージョン識別子
<client id>:クライアントバージョン識別子Read error from remote host <host>: <message> リモートホストからの受信エラーです。
<host>:リモートホスト
<message>:エラー内容Read error from remote host <host>: Network is down リモートホストとのネットワークがダウンしました。
<host>:リモートホストReceived disconnect from <host>: リモートホストによって切断されました(理由なしの場合)。
<host>:リモートホストReceived disconnect from <host>: <code>: Authentication cancelled by user. 認証がキャンセルされたため,切断されました。
<host>:リモートホスト
<code>:SSHプロトコルの理由コードReceived disconnect from <host>: <code>: disconnected by server request リモートホストの要求によって切断されました。
<host>:リモートホスト
<code>:SSHプロトコルの理由コードReceived disconnect from <host>: <code>: No further authentication methods available. これ以上の認証方式がないため,切断されました。
<host>:リモートホスト
<code>:SSHプロトコルの理由コードReceived disconnect from <host>: <reason> リモートホストによって切断されました。
<host>:リモートホスト
<reason>:リモートホストからの切断理由RSA key generation complete. RSAサーバ鍵を生成しました。 scanned from <host> with <id>. Don't panic. <host>から<id>で検索されましたが問題ありません。
<host>:リモートホスト
<id>:バージョン識別子Sent 768 bit server key and 1024 bit host key. サーバ鍵とホスト鍵を送信しました。 sshd: no hostkeys available -- exiting. ホスト鍵が読み込めませんでした。set ssh hostkeyコマンドでホスト鍵を再作成してください。 subsystem request for <subsystem> failed, subsystem not found <subsystem>を要求されましたが失敗しました(該当する<subsystem>は存在しません)。
<subsystem>:要求サブシステム名subsystem request for sftp sftp接続を要求されました。 trying public RSA key file [/usr]/home/<user>/.ssh/authorized_keys SSHv1の公開鍵認証を試行しています。
<user>:ユーザ名Unknown packet type received after authentication: <type> 認証後に不正なパケットタイプ<type>を受信しました。
<type>:SSHクライアントメッセージタイプUser <user> from <host> not allowed because none of user's groups are listed in AllowGroups <host>から接続された<user>は無効なユーザです(認証でエラーとなります)。
<user>:ユーザ名
<host>:リモートホストUser <user> from <host> not allowed because not in any group <host>から接続された<user>は無効なユーザです(認証でエラーとなります)。
<user>:ユーザ名
<host>:リモートホストUser <user> not allowed because /etc/nologin exists 指定ユーザはログインできません。
<user>:ユーザ名User uucp not allowed because shell /usr/libexec/uucp/uucico does not exist 指定ユーザ(uucp)はログインできません。 Warning: keysize mismatch for client_host_key: actual <size1>, announced <size2> クラアントホスト鍵の長さが合っていません。
<size1>:実際の鍵長
<size2>:広告された鍵長Wrong response to RSA authentication challenge. RSA認証の応答が間違っていました。
[通信への影響]
なし
[応答メッセージ]
表8-7 show ssh loggingコマンドの応答メッセージ一覧
メッセージ 内容 Can't execute (<reason>). コマンドが実行できませんでした。
<reason>:内部詳細情報
[対応]
コマンドを再実行してください。No such Switch <switch no.>. 指定されたスイッチ番号が存在しません。指定パラメータを確認して再実行してください。
また,メンバスイッチの追加直後などは,コマンドを実行できないことがあります。その場合は,再実行してください。
<switch no.>:スイッチ番号
[注意事項]
- ログは最大64Kbyteまで保存されます。これを超えた場合,古いログから自動的に消去されます。
- SSHサーバのログは,本装置の電源をOFFにしたり再起動したりすると消去されます。
All Rights Reserved, Copyright(C), 2011, 2018, ALAXALA Networks, Corp.