運用コマンドレファレンス Vol.1
SSHサーバの運用状態のトレースログを表示します。
[入力形式]
show ssh logging [switch <switch no.>]
[入力モード]
一般ユーザモードおよび装置管理者モード
[パラメータ]
- switch <switch no.>
- スタックを構成している場合,指定したスイッチ番号のメンバスイッチに対してコマンドを実行します。本パラメータはスタック構成時のマスタスイッチで指定できます。指定できる値の範囲は,「パラメータに指定できる値」を参照してください。
- 本パラメータ省略時の動作
- 自装置に対してコマンドを実行します。
[スタック構成時の運用]
マスタスイッチからスタックを構成しているメンバスイッチのスイッチ番号を指定してコマンドを実行できます。
なお,remote commandコマンドも使用できます。
remote command {<switch no.> | all} show ssh logging
[実行例]
図8-11 SSHサーバのトレースログの表示
> show ssh logging Date 20XX/12/04 15:30:38 UTC 20XX/12/04 15:30:35 sshd[4021] Disconnected from 192.0.2.1 port 34506 20XX/12/04 15:30:35 sshd[4021] Received disconnect from 192.0.2.1 port 34506:11: disconnected b y user 20XX/12/04 15:29:36 sshd[4021] Starting session: shell on ttyp0 for sshusr from 192.0.2.1 port 34506 id 0 20XX/12/04 15:29:36 sshd[4021] Entering interactive session for SSH2. 20XX/12/04 15:29:36 sshd[4021] Accepted publickey for sshusr from 192.0.2.1 port 34506 ssh2: RS A SHA256:EurqlJf/ yKwixDk8bNiCSGi+aVmgFVLx+PyrXQV6dxQ 20XX/12/04 15:29:36 sshd[4021] Postponed publickey for sshusr from 192.0.2.1 port 34506 ssh2 20XX/12/04 15:29:36 sshd[4021] Failed none for sshusr from 192.0.2.1 port 34506 ssh2 20XX/12/04 15:29:34 sshd[4021] kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compre ssion: none 20XX/12/04 15:29:34 sshd[4021] kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compre ssion: none 20XX/12/04 15:29:34 sshd[4021] Client protocol version 2.0; client software version OpenSSH_7.3 20XX/12/04 15:29:34 sshd[4021] Connection from 192.0.2.1 port 34506 on 192.0.2.100 port 22
[表示説明]
トレースログの表示形式を次に示します。
yyyy/mm/dd hh:mm:ss sshd[プロセス番号] message 1 2 3
- 時刻:採取年,月,日,時,分,秒を表示します。
- プロセス番号:サーバのプロセス番号を表示します。
- メッセージ:トレースログのメッセージを表示します。
トレースログのメッセージと内容を次の表に示します。
表8-7 トレースログのメッセージと内容
メッセージ 内容 <authentication method> authentication disabled. <authentication method>は使用できません。
<authentication method>:ユーザ認証方式<function>: <message> イベントを検出しました。
<function>:機能名
<message>:通知内容[/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> <ssh version>[: <key type> <fp>] <authentication method>によるユーザ認証に成功しました。
<authentication method>:ユーザ認証方式
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<ssh version>:SSHプロトコルバージョン(ssh1またはssh2)
公開鍵認証の場合は次の情報も表示します。
<key type>:ユーザ公開鍵種別
<fp>:ユーザ公開鍵のフィンガープリントBad protocol version identification '<string>' from <host> port <port> <host>から不正なバージョン識別子を受信しました。
<string>:受信したバージョン識別子
<host>:リモートホストまたはUNKNOWN
<port>:リモートホストのポートまたは65535Client protocol version <version>; client software version <software version> クライアントのプロトコルバージョンとソフトウェアバージョンを表示します。
<version>:プロトコルバージョン
<software version>:ソフトウェアバージョンClosing connection to <host> [on VRF <vrf id>] <host>との接続を終了しました。
<host>:リモートホスト
<vrf id>:VRF IDClosing session: usr <user> from <host> port <port> id <session id> SSHセッションを終了します。
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<session id>:セッションIDConnection closed by <host> port <port> <host>との接続が切れました。
<host>:リモートホスト
<port>:リモートホストのポートConnection from <host> port <port> on <local host> port <local port> [VRF <vrf id>] <host>の<port>から接続されています。
<host>:リモートホスト
<port>:リモートホストのポート
<local host>:リモートホスト
<local port>:リモートホストのポート
<vrf id>:VRF IDConnection reset by <host> port <port> <host>との接続を切断しました。
<host>:リモートホスト
<port>:リモートホストのポートCould not write ident string to <host> port <port> <host>へバージョン識別子を送信できませんでした。
<host>:リモートホスト
<port>:リモートホストのポートDid not receive identification string from <host> port <port> <host>からバージョン識別子を受信できませんでした。
<host>:リモートホスト
<port>:リモートホストのポート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コマンドでホスト鍵を再作成してください。 Disconnected from <host> port <port> <host>との接続を切断しました。
<host>:リモートホスト
<port>:リモートホストのポートDisconnecting: crc32 compensation attack detected CRC32攻撃を検知したため,切断しました。 Disconnecting: deattack denial of service detected DoS攻撃を検知したため,切断しました。 Disconnecting: deattack error 何らかの攻撃を検知したため,切断しました。 Disconnecting: Too many authentication failures 多数の認証失敗を検出したため切断しました。 Encryption type: <cipher> 共通鍵暗号方式は<cipher>を使用します。
<cipher>:共通鍵暗号方式名Entering interactive session for SSH2. SSHv2のセッションを開始しました。 Entering interactive session. SSHv1のセッションを開始しました。 error: <function>: <reason> エラーを検出しました。
<function>:機能名
<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: key_from_blob: <reason> 公開鍵に異常があります。
<reason>:異常理由error: maximum authentication attempts exceeded for [invalid user] <user> from <host> port <port> <ssh version> <user>による最大認証試行回数の超過を検出しました。
invalid user:無効なユーザ名の場合に表示します
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<ssh version>:SSHプロトコルバージョン(ssh1またはssh2)Exec command '<command>' コマンドが実行されました。
<command>:コマンドFailed <authentication method> for [invalid user] <user> from <host> port <port> <ssh version> <authentication method>によるユーザ認証に失敗しました。
<authentication method>:ユーザ認証方式
password:パスワード認証
publickey:公開鍵認証
none:無認証
invalid user:無効なユーザ名の場合に表示します
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<ssh version>:SSHプロトコルバージョン(ssh1またはssh2)fatal: <function>: <reason> 続行できないエラーを検出したため,強制的に終了します。
<function>:機能名
<reason>:原因fatal: auth_rsa_verify_response: <reason> 公開鍵認証で使用するRSA鍵に異常があります。
<reason>:異常理由fatal: decode blob failed: <reason> 公開鍵認証で使用する鍵に異常があります。
<reason>:異常理由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: Timeout before authentication for <host> port <port> ログイン認証がタイムアウトしました。
<host>:リモートホスト
<port>:リモートホストのポートfatal: uudecode failed. 公開鍵認証で使用する鍵に異常があります。 Generating 1152 bit RSA key. RSAサーバ鍵を生成しています。 input_userauth_request: invalid user <user> 使用できないユーザ名が指定されました。
<user>:ユーザ名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> <ssh version> <authentication method>によるユーザ認証を保留しました。
<authentication method>:ユーザ認証方式
invalid user:無効なユーザ名の場合に表示します
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<ssh version>:SSHプロトコルバージョン(ssh1またはssh2)probed from <host> port <port> with <id>. Don't panic. <host>から<id>で探索されましたが問題ありません。
<host>:リモートホスト
<port>:リモートホストのポート
<id>:バージョン識別子Protocol major versions differ for <host> port <port>: <server id> vs. <client id> <host>とのSSHプロトコルバージョンが<server id>と<client id>で異なります。
<host>:リモートホスト
<port>:リモートホストのポート
<server id>:サーババージョン識別子
<client id>:クライアントバージョン識別子Read error from remote host <host> port <port>: <message> リモートホストからの受信エラーです。
<host>:リモートホスト
<port>:リモートホストのポート
<message>:エラー内容Received disconnect from <host> port <port>: <message> リモートホストによって切断されました。
<host>:リモートホスト
<port>:リモートホストのポート
<message>:リモートホストからのメッセージReceived disconnect from <host> port <port>:<code>: <message> リモートホストによって切断されました。
<host>:リモートホスト
<port>:リモートホストのポート
<code>:リモートホストから通知された識別コード
<message>:リモートホストからのメッセージRSA key generation complete. RSAサーバ鍵を生成しました。 scanned from <host> port <port> with <id>. Don't panic. <host>から<id>で検索されましたが問題ありません。
<host>:リモートホスト
<port>:リモートホストのポート
<id>:バージョン識別子Sent 1152 bit server key and 1024 bit host key. サーバ鍵とホスト鍵を送信しました。 sshd: no hostkeys available -- exiting. 有効なホスト鍵がないため終了します。set ssh hostkeyコマンドでホスト鍵を再作成してください。 Starting session: <session type> [on <tty>] for <user> from <host> port <port> id <session id> SSHセッションを開始します。
<session type>:SSHセッションの種別(shell,command,subsystem 'sftp'など)
<tty>:端末情報
<user>:ユーザ名
<host>:リモートホスト
<port>:リモートホストのポート
<session id>:セッションIDsubsystem request for <subsystem> failed, subsystem not found <subsystem>を要求されましたが失敗しました(該当する<subsystem>は存在しません)。
<subsystem>:要求サブシステム名subsystem request for sftp sftp接続を要求されました。 Transferred: sent <tx>, received <rx> bytes 次の通信が実施されました。
<tx>:送信データサイズ(byte)
<rx>:受信データサイズ(byte)trying public RSA key file [/usr]/home/<user>/.ssh/authorized_keys SSHv1の公開鍵認証を試行しています。
<user>:ユーザ名Unable to negotiate with <host> port <port>: <reason>: Their offer: <offer> <host>とネゴシエーションできません。
<host>:リモートホスト
<port>:リモートホストのポート
<reason>:原因
<offer>:リモートホストの要求Unknown packet type received after authentication: <type> 認証後に不正なパケットタイプ<type>を受信しました。
<type>:SSHクライアントメッセージタイプUser <user> not allowed because <message> 指定ユーザはログインできません。
<user>:ユーザ名
<message>:拒否理由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-8 show ssh loggingコマンドの応答メッセージ一覧
メッセージ 内容 Can't execute (<reason>). コマンドが実行できませんでした。
<reason>:内部詳細情報
[対応]
コマンドを再実行してください。No such Switch <switch no.>. 指定されたスイッチ番号が存在しません。指定パラメータを確認して再実行してください。
また,メンバスイッチの追加直後などは,コマンドを実行できないことがあります。その場合は,再実行してください。
<switch no.>:スイッチ番号
[注意事項]
- ログは最大64Kbyteまで保存されます。これを超えた場合,古いログから自動的に消去されます。
- SSHサーバのログは,本装置の電源をOFFにしたり再起動したりすると消去されます。
All Rights Reserved, Copyright(C), 2017, 2020, ALAXALA Networks, Corp.