第2編
管理運用

SSH/Telnetの状態確認

SSH/Telnetの状態を表示して確認する方法を説明します。

SSHの接続情報の表示

show sshコマンドでSSHの接続情報を確認できます。

表示例を以下に示します。

# show ssh
(1) (2)  (3)                        (4)              (5)
SID Ver. Cipher                     Userid           Client IP Address
--- --- --------------------------- ---------------- -------------------------
0   V2  3des-cbc/sha1-96            user1            192.168.0.100
1   V2  3des-cbc/hmac-sha1          user2            2000::243

Total Entries: 2

各項目の説明は、以下のとおりです。

show sshコマンドの表示項目
項番説明
(1) SSHセッションを識別する一意の番号を表示します。
(2) SSHのバージョンを表示します。
(3) 使用している暗号化方式とメッセージ認証符号を表示します。
(4) ログインユーザー名を表示します。
(5) SSHクライアントのIPアドレスを表示します。

SSHサーバーの設定の表示

show ip sshコマンドでSSHサーバーの設定を確認できます。

表示例を以下に示します。

# show ip ssh

IP SSH server             : Enabled...(1)
IP SSH service port       : 22...(2)
SSH server mode           : V2...(3)
Authentication timeout    : 120 secs...(4)
Authentication retries    : 3 times...(5)

各項目の説明は、以下のとおりです。

show ip sshコマンドの表示項目
項番説明
(1) SSHサーバーの有効(Enabled)/無効(Disabled)を表示します。
(2) SSHのTCPポート番号を表示します。
(3) SSHサーバーのバージョンを表示します。
(4) 認証タイムアウト時間を表示します。
(5) 認証リトライ回数を表示します。

鍵交換方式、暗号化方式、メッセージ認証符号の設定の表示

show ssh algorithmコマンドで、鍵交換方式の各アルゴリズムの有効/無効、暗号化方式の各アルゴリズムの有効/無効、各メッセージ認証符号の有効/無効を確認できます。

補 足

鍵交換方式、暗号化方式、メッセージ認証符号の設定は、NP7000の1.10.02以降、NP3000の1.10.01以降、NP2100の1.11.01以降、NP2500の1.12.01以降でサポートしています。

表示例を以下に示します。

# show ssh algorithm

Key Exchange ...(1)                      State ...(2)
--------------------------------------   --------
diffie-hellman-group1-sha1               Enabled
diffie-hellman-group14-sha1              Enabled
diffie-hellman-group14-sha256            Enabled
diffie-hellman-group16-sha512            Enabled
diffie-hellman-group18-sha512            Enabled
diffie-hellman-group-exchange-sha1       Enabled
diffie-hellman-group-exchange-sha256     Enabled
ecdh-sha2-nistp256                       Enabled
ecdh-sha2-nistp384                       Enabled
ecdh-sha2-nistp521                       Enabled
curve25519-sha256                        Enabled
curve25519-sha256@libssh.org             Enabled

Cipher ...(3)                            State ...(4)
--------------------------------------   --------
3des-cbc                                 Enabled
aes128-cbc                               Enabled
aes192-cbc                               Enabled
aes256-cbc                               Enabled
aes128-ctr                               Enabled
aes192-ctr                               Enabled
aes256-ctr                               Enabled
arcfour                                  Enabled
blowfish-cbc                             Enabled
cast128-cbc                              Enabled
aes128-gcm@openssh.com                   Enabled
aes256-gcm@openssh.com                   Enabled
chacha20-poly1305@openssh.com            Enabled
twofish-cbc                              Enabled
twofish256-cbc                           Enabled
twofish192-cbc                           Enabled
twofish128-cbc                           Enabled

Message Authentication Code ...(5)       State ...(6)
--------------------------------------   --------
hmac-sha1                                Enabled
hmac-sha1-96                             Enabled
hmac-sha2-256                            Enabled
hmac-sha2-512                            Enabled
hmac-md5                                 Enabled
hmac-md5-96                              Enabled
umac-64@openssh.com                      Enabled
umac-128@openssh.com                     Enabled
hmac-sha1-etm@openssh.com                Enabled
hmac-sha1-96-etm@openssh.com             Enabled
hmac-sha2-256-etm@openssh.com            Enabled
hmac-sha2-512-etm@openssh.com            Enabled
hmac-md5-etm@openssh.com                 Enabled
hmac-md5-96-etm@openssh.com              Enabled
umac-64-etm@openssh.com                  Enabled
umac-128-etm@openssh.com                 Enabled

Public Key Algorithm ...(7)
--------------------------------------
ssh-rsa
ssh-dss

各項目の説明は、以下のとおりです。

show ssh algorithmコマンドの表示項目
項番説明
(1) 鍵交換方式(Key exchange algorithms)を表示します。
(2) 各鍵交換方式の有効(Enabled)/無効(Disabled)を表示します。
(3) 暗号化方式(Cipher algorithms)を表示します。
(4) 各暗号化方式の有効(Enabled)/無効(Disabled)を表示します。
(5) メッセージ認証符号(Message Authentication Code)を表示します。
(6) 各メッセージ認証符号の有効(Enabled)/無効(Disabled)を表示します。
(7) 公開鍵アルゴリズム(Public Key Algorithm)を表示します。

SSHサーバーのホストキーの表示

show crypto key mypubkeyコマンドでSSHサーバーのRSA鍵、またはDSA鍵を確認できます。

SSHサーバーのRSA鍵の表示例を以下に示します。

# show crypto key mypubkey rsa

% Key pair was generated at: 13:02:23, 2024-07-23 ...(1)
Key Size: 2048 bits ...(2)
Key Data: ...(3)
AAAAB3Nz aC1yc2EA AAADAQAB AAABAQD2 tE2iMT+e urUzKLjr 2xx1DENl jPdk3W4Z
6Mpg5btT haFksJfr +JRfbkq+ cMt4zOur /vO5etKR NdsTuHco czdo8M/6 kvPYQlp3
j0+uyPaU bYxRHdrY mZs+lVP9 xUZnf9IE t2CB11FF GSq9deIP mKtZsCn+ nfHo6DMf
iMAuJy4O TK/3gFY0 Qpsp8G3o PdEK5gKu n2iKnLEh F4ZXni3p OYnVJsj9 bE9jlbT1
yB5dtad+ wcy0Ko85 F2THjcJ/ 5+nKsk0Z XjHVm2m8 MVXet39h aVHj9Krz I9LU6L18
BWnyzVCc eY1Wh9Ft UkrzKnY+ XapB15aH 8UuyeTF4 PJQ6Uy15 R/cL

各項目の説明は、以下のとおりです。

show crypto key mypubkey rsaコマンドの表示項目
項番説明
(1) RSA鍵対が生成された日時を表示します。
restoreコマンドを実行して装置を起動し直した後は、restoreコマンド実行時の時刻(RSA鍵が置き換えられた時刻)に変更されます。
SDカードブートで起動した場合は、RSA鍵が置き換えられた起動時の時刻に変更されます。なお、この場合はUTC時刻が記録されます。
(2) RSA鍵の鍵長を表示します。
(3) RSA鍵の情報を表示します。

SSHサーバーのDSA鍵の表示例を以下に示します。

# show crypto key mypubkey dsa

% Key pair was generated at: 14:55:01, 2020-06-02 ...(1)
Key Size: 1024 bits ...(2)
Key Data: ...(3)
AAAAB3Nz aC1kc3MA AACBAL7+ Pi0IEeTE 57pUbmuy XfyUultm T1IP/vvP ebFLRMRF
57gyjM/v RUpipRs5 zz4xOuyl 5gT5Jfkm wyfhPUsJ mA3wW3U4 fMYCHoHx qzGYRey1
/uIce7wU vORSLc/o kgRDYbfu AvvvMqCh Hn72k1n/ D6ftT324 kHfVymGg 4GQ/ICwP
AAAAFQDM cz4dZV/Q Tv/QbTj8 oZTLiRpb FwAAAIEA gS1wH5Jf 8FngnwDg 21QfXRGW
40MoIO4H h+g6E1MF NdFxruOf QG3++sj0 rcEMsqpW T2lqu5zF K4n5J6tj YD1Ep7fn
2Q+vidj7 A9PFI5KQ x1aASrQA AedExUMQ zpuXA94/ jJbNR3TM MKC/YtkK S0Vd3sUF
QyiAjV8t RG7gT2mH Gp8AAACB AKBCupVR +XyOtk53 6HFqp6gZ wHygUgNq ue5m6XIn
yG6zFgln j78yf0q2 7HqfXRlh lWDjKisx d8makEme u/ecwoTN fWFfxC7j V0Qvfzdz
MrtHSca9 AFenLAw7 PX9eNieh 73D8G8PW ws9FT+C0 EkBtA7ly uJrqj4/D +FnLH7dy
PfXD

各項目の説明は、以下のとおりです。

show crypto key mypubkey dsaコマンドの表示項目
項番説明
(1) DSA鍵対が生成された日時を表示します。
restoreコマンドを実行して装置を起動し直した後は、restoreコマンド実行時の時刻(DSA鍵が置き換えられた時刻)に変更されます。
SDカードブートで起動した場合は、DSA鍵が置き換えられた起動時の時刻に変更されます。なお、この場合はUTC時刻が記録されます。
(2) DSA鍵の鍵長を表示します。DSAの場合は1024ビット固定です。
(3) DSA鍵の情報を表示します。

Telnetサーバーの設定の表示

show ip telnet serverコマンドでTelnetサーバーの設定を確認できます。

表示例を以下に示します。

# show ip telnet server

Server State: Enabled ...(1)

各項目の説明は、以下のとおりです。

show ip telnet serverコマンドの表示項目
項番説明
(1) Telnetサーバーの有効(Enabled)/無効(Disabled)を表示します。

ページトップへ