[index] AMF Cloud リファレンスマニュアル 5.5.0
awplus(config)# username admin privilege 15 password adkf8KH! ↓
awplus(config)# crypto key generate hostkey dsa ↓ Generating host key (1024 bits dsa) This may take a while. Please wait ... Done WARNING: The SSH server must now be enabled with "service ssh"
awplus(config)# ssh server v2only ↓
awplus(config)# service ssh ↓
Noteservice sshコマンドの実行時にSSHバージョン2用のホスト鍵が1つも存在していない場合は、SSHバージョン2用のRSA鍵(1024ビット)が自動的に生成されます(すでに存在している場合はその鍵が使われます)。
awplus(config)# ssh server allow-users manager ↓ awplus(config)# ssh server allow-users admin ↓
awplus(config)# end ↓ awplus# copy scp://pcuser@pchost.example.com/tmp/admin_id_dsa.pub flash ↓ Enter destination file name [admin_id_dsa.pub]: ↓ pcuser@pchost.example.com's password: XXXXXXXX ↓ (実際には表示されません) Copying.. Successful operation
Noteリモートコピーの方法については、copyコマンドのページや「運用・管理」の「ファイル操作」をご覧ください。
awplus# configure terminal ↓ Enter configuration commands, one per line. End with CNTL/Z. awplus(config)# crypto key pubkey-chain userkey admin admin_id_dsa.pub ↓
awplus(config)# ssh server allow-users manager 192.168.10.186 ↓
awplus(config)# ssh server allow-users manager 192.168.10.* ↓
Noteワイルドカードを用いてIPアドレスを範囲指定した場合、「% Warning: ssh server resolve-hosts is not enabled.」という警告メッセージが出ますが、次項で述べる「ホスト名による指定」を使っていない場合は無視してかまいません。
Noteアクセスが許可されていないホスト/ユーザーからSSHでログインしようとした場合、コンソール上に「sshd[3374]: fatal: mm_request_receive_expect: read: rtype 48 != type 46」のようなデバッグメッセージが表示されます。
awplus(config)# ip name-server 172.16.10.8 ↓ awplus(config)# ssh server resolve-hosts ↓ awplus(config)# ssh server allow-users admin delirium.example.com ↓
Notessh server resolve-hostsコマンドを実行せずにホスト名を指定した場合は「% Warning: ssh server resolve-hosts is not enabled.」という警告メッセージが出ます。ホスト名を指定する場合は必ずssh server resolve-hostsコマンドを実行して、ホスト名の逆引きを有効化してください。逆引きが無効の場合、ホスト名パターンを含むエントリーには一切マッチしませんのでご注意ください。
awplus# show ssh server ↓ Secure Shell Server Configuration ------------------------------------------------------------ SSH Server : Enabled Protocol : IPv4,IPv6 Port : 22 Version : 2 Services : scp, sftp User Authentication : publickey, password Resolve Hosts : Disabled Session Timeout : 0 (Off) Login Timeout : 60 seconds Maximum Startups : 10 Debug : NONE
awplus# show crypto key hostkey ↓ Type Bits Fingerprint ------------------------------------------------------------- dsa 1024 2e:d7:cf:82:42:8e:74:fa:f4:ca:14:3c:0c:ab:42:fd awplus# show crypto key hostkey dsa ↓ ssh-dss AAAAB3NzaC1kc3MAAACBAMpRf/HUiLLvgfR0O43RUZz7/VupV6rjgSPLRpLbYRbt9jP4oBJG 9kNQtVGsCfAixIsW+3je+Lke2NOQTrwmoYfVfwN/9efJkeGjPy7QYcoZ4kLZFHrg4Tcsuwfg4QAD17kx nAIhT8rTh5VHH1XPOuahv51+YsLsmJybObm02uQTAAAAFQCEDAD4nP4XorJ2EMngYzHjMrxIlQAAAIB4 joc6+rap4lfCr1A1Us1j+2jcCecmjnyJJFt+kM/EHkwAilcPZJVxPP4QTQSXMDu/yRvwvDWOaQa+C+nl +1JMd/DtYvZMAzmAQkaE0NPJ3sYgoRiCvlA5Gpr2QCBcQehdkSb/VskX3SHgvoICM/1qbWA64uq6TpBz QrMBguFo9QAAAIEAvckA/HlzFMdniNpvM1PoPMH4eh9ib8W23w17lms8jpZ0yUpSkP/A++HKLWVUkOaP 4rarGnsBQlrLabRNJdb7Ew05Zi2ffIXTGaJGF6tJe/eoAhYRDMi7r96LVM03ZrYS/lkO1/C/OeIf+/KM UM0gklDKfwuBCSXapPB7pxbRVmM=
awplus# show crypto key pubkey-chain userkey admin ↓ No Type Bits Fingerprint Comment ------------------------------------------------------------------------------- 1 dsa 1024 a6:af:50:12:63:56:0c:cb:c5:55:45:e3:6e:e9:c5:84 admin@zebra2 awplus# show crypto key pubkey-chain userkey manager 1 ↓ ssh-dss AAAAB3NzaC1kc3MAAACBANr2Pdv1JUYEcZ1WEsVspCQPKcfcvIE/r72O+xURyWw8UNEIpYMw 4K5uARFJcC5NJqRztIQdq2Gw5d3jVkSgzgDYo/FRfendpn0f7wYx5zaI0apdC90Z03EHUyoY+To2pbHJ 6JmuvxwHKO4ZRwUYje9JGJFo0P2XVrf1mSauXo+FAAAAFQDHTbswc8KekH6tIGlZIWJMD8oZoQAAAIEA zpQTJC1XZHBpZIqa6tQ42zt8q30pNxFUkJHUdahhV8+zuHyNgumDfAB57nlmdDOjbUzq2DrNVeU+fipQ M9ZZmZbeZNLSKSIl8sCMuHNdI2eISYygoJxQSKe6gMlH/Z6B5FOdhf+0m96DudiSNxc82fXmqPs+fSnv owhDiMlDPF8AAACAP+h/1iWUOhvO/abnwN0YK0N6W/F0IMIxgy+fv2rKw1hwFx/r5WAfzNQW6oIN3O+j ZDsx1pkkF4xhwtND7GNS5OvTKob6y7bQkQetHhXekyX9UsiGBPuVJXHWkeJv9fV5q5EudyJCn4nB6vUb zYz4h1wZJwQGd5toRolb12Pg91Q= admin@zebra2
awplus> show users ↓
awplus# show ssh ↓ Secure Shell Sessions: ID Type Mode Peer Host Username State Filename ------------------------------------------------------------------------------ 3402 ssh server 192.168.20.2 admin open
awplus# clear ssh 3402 ↓
awplus# ssh user zein 192.168.10.5 ↓ The authenticity of host '192.168.10.5 (192.168.10.5)' can't be established. RSA key fingerprint is 35:7f:a5:0d:f1:70:a7:e4:5c:b2:27:fe:54:d8:9a:f3. Are you sure you want to continue connecting (yes/no)? yes ↓ Warning: Permanently added '192.168.10.5' (RSA) to the list of known hosts. zein@192.168.10.5's password: XXXXXXXX ↓ (実際には表示されません) Last login: Wed Sep 14 14:01:55 2011 from awplus Welcome to Darwin! [1488] zein@bird:~%
The authenticity of host '192.168.10.5 (192.168.10.5)' can't be established. RSA key fingerprint is 35:7f:a5:0d:f1:70:a7:e4:5c:b2:27:fe:54:d8:9a:f3. Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '192.168.10.5' (RSA) to the list of known hosts.
awplus> ssh user zein 192.168.10.5 ↓ zein@192.168.10.5's password:
awplus# ssh 192.168.10.5 ↓ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is f2:a8:87:eb:22:34:26:9b:2a:b2:2f:d2:16:b0:6c:89. Please contact your system administrator. RSA host key for 192.168.10.5 has changed and you have requested strict checking. Host key verification failed. awplus#
awplus# show crypto key pubkey-chain knownhosts ↓ No Hostname Type Fingerprint ------------------------------------------------------------------------- 1 afrika.example.c dsa a0:91:f6:52:b2:98:f5:9b:90:3d:51:82:96:15:29:24 2 192.168.10.2 dsa 71:45:be:18:35:42:03:85:1a:42:ae:b3:3f:37:d6:51 3 192.168.20.2 dsa 71:45:be:18:35:42:03:85:1a:42:ae:b3:3f:37:d6:51 4 172.16.10.3 dsa d3:d6:63:39:f4:ac:5d:c7:00:7a:28:dd:f3:a9:12:31 5 192.168.10.5 rsa 35:7f:a5:0d:f1:70:a7:e4:5c:b2:27:fe:54:d8:9a:f3 6 10.100.10.100 rsa 2a:6f:4f:c4:5f:6a:e6:35:1c:39:aa:38:c1:7b:a5:1c
awplus# configure terminal ↓ Enter configuration commands, one per line. End with CNTL/Z. awplus(config)# no crypto key pubkey-chain knownhosts 5 ↓ awplus(config)# end ↓
awplus# ssh user zein 192.168.10.5 ↓ The authenticity of host '192.168.10.5 (192.168.10.5)' can't be established. RSA key fingerprint is f2:a8:87:eb:22:34:26:9b:2a:b2:2f:d2:16:b0:6c:89. Are you sure you want to continue connecting (yes/no)? yes ↓ Warning: Permanently added 'localhost' (RSA) to the list of known hosts. zein@192.168.10.5's password:
awplus(config)# crypto key pubkey-chain knownhosts 192.168.10.5 rsa ↓ 192.168.10.5 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAxYYxBFU5Xyqyv0YfAyLg8TOrWvhG3VWoWv QX/MYTdym4uLRAejxBp1DEpRYuEe34j5i4oVfhYjhfCQthbzLAyaTAyTD40hHIvaJL+CAA3w+TjnTUIb bv+IdVGdr3v2i5U6TkXeSuxWWvc8jsPcRnrKGzEPRfWKH/w1KIGvyb9e8= Are you sure you want to add this public key (yes/no)? yes ↓
Notesshコマンドでコマンド行を指定したときは、指定したコマンド行の実行後にコネクションが切断されます。コマンド行を指定しなかったときは、前述のとおりSSHサーバーにログインして対話型セッションを開始します。
awplus# ssh user zein 10.100.10.100 netstat -an -f inet ↓ zein@10.100.10.100's password: XXXXXXXX ↓ (実際には表示されません) Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 10.100.10.100.22 10.100.10.1.38199 ESTABLISHED tcp4 0 0 127.0.0.1.1033 127.0.0.1.976 ESTABLISHED tcp4 0 0 127.0.0.1.976 127.0.0.1.1033 ESTABLISHED tcp4 0 0 *.22 *.* LISTEN tcp4 0 0 *.* *.* CLOSED tcp4 0 0 *.80 *.* LISTEN tcp4 0 0 127.0.0.1.8005 *.* LISTEN tcp46 0 0 *.8009 *.* LISTEN tcp4 0 0 127.0.0.1.5432 127.0.0.1.49154 ESTABLISHED tcp4 0 0 127.0.0.1.49154 127.0.0.1.5432 ESTABLISHED tcp46 0 0 *.8080 *.* LISTEN tcp4 0 0 *.5432 *.* LISTEN tcp4 0 0 *.* *.* CLOSED tcp4 0 0 127.0.0.1.1033 127.0.0.1.1019 ESTABLISHED tcp4 0 0 127.0.0.1.1019 127.0.0.1.1033 ESTABLISHED tcp4 0 0 127.0.0.1.631 *.* LISTEN tcp4 0 0 *.23 *.* LISTEN tcp4 0 0 *.139 *.* LISTEN tcp4 0 0 127.0.0.1.1033 *.* LISTEN ... awplus#
awplus# copy scp://zein@10.100.10.100/tmp/testtest.cfg flash ↓ Enter destination file name [testtest.cfg]: zein@10.100.10.100's password: XXXXXXXX ↓ (実際には表示されません) Copying.. Successful operation
awplus# copy testtest2.cfg scp://zein@10.100.10.100/tmp/ ↓ Enter destination file name [testtest2.cfg]: zein@10.100.10.100's password: XXXXXXXX ↓ (実際には表示されません) Successful operation
awplus# copy sftp://zein@10.100.10.100/tmp/aaaaa.txt flash ↓ Enter destination file name [aaaaa.txt]: zein@10.100.10.100's password: Copying.. Successful operation
(C) 2016 - 2020 アライドテレシスホールディングス株式会社
PN: 613-002312 Rev.S