時刻とパスワード、ログインユーザーの設定

使用機器:Cisco Catalyst 2960-24TT-L Switch(WS-C2960-24TT-L)
バージョン:12.2(53)SE2

OnirSwitch>
OnirSwitch>enable
特権EXECモード#に移行。

OnirSwitch#show clock
システム時間を表示

*00:00:51.950 UTC Mon Mar 1 1993

OnirSwitch#clock set 17:21:00 18 jun 2018
現在時間を設定

OnirSwitch#show clock
システム時間を表示

17:21:05.435 UTC Mon Jun 18 2018
時間が変更されたことを確認

OnirSwitch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
コンフィグレーションモード(config)#に移行。

OnirSwitch(config)#line console 0
ラインコンフィグレーションモード(config-line)#に移行

OnirSwitch(config-line)#password xxxx9999
パスワードを設定。

OnirSwitch(config-line)#login
設定したパスワードをloginで使用。

OnirSwitch(config-line)#exit
コンフィグレーションモード(config)#に移行。

OnirSwitch(config)#service password-encryption
設定したパスワードを暗号化。

OnirSwitch(config)#enable secret xxxx9999
暗号化したパスワードを有効化。

OnirSwitch(config)#^Z
特権EXECモード#に移行。

OnirSwitch#exit
ユーザーEXECモード>に移行。

Press RETURN to get started.
User Access Verification
エンターキーを押下。

Password:
パスワードを入力して「Enter」キーを押下ログイン。

OnirSwitch>enable
特権EXECモード#に移行。

Password:
特権EXECモード#に移行のパスワードを入力して「Enter」キーを押下。

OnirSwitch#configure terminal
コンフィグレーションモード(config)#に移行。

OnirSwitch(config)#^Z
「Ctrl」+「z」キー押下、特権EXECモード#に移行。

OnirSwitch#
OnirSwitch#show clock
現在時間の確認

17:36:06.674 UTC Mon Jun 18 2018

OnirSwitch#configure terminal
コンフィグレーションモード(config)#に移行。

OnirSwitch(config)#username oniradmin password xxxx9999
SSH接続でログインするためユーザーとパスワードを設定。

OnirSwitch(config)#line vty 0 4
line vtyポート設定

OnirSwitch(config-line)##login local
SSH接続でVTYポートにログインする際に、line vtyに設定されたパスワードではなく、上記で設定したユーザーとパスワードを認証の際に使用するように、line vtyにローカル認証の設定。

OnirSwitch(config-line)#exit
line vtyポート設定の終了。

OnirSwitch(config)#ip domain-name onir.local

OnirSwitch(config)#crypto key generate rsa
SSHで使用するRSA暗号鍵を生成

The name for the keys will be: OnirSwitch.onir.local
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024
鍵長サイズの指定、1024を入力し「Enter」キーを押下。

% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]

OnirSwitch(config)#ip ssh version 2
SSHのバージョンの設定、バージョン2を指定。

OnirSwitch(config)#line vty 0 4
line vtyポート設定。

OnirSwitch(config-line)#transport input ssh
スイッチへの接続はSSH(telnetを使用しない)のみに変更。

OnirSwitch(config-line)#
OnirSwitch(config-line)#

OnirSwitch(config-line)#exit
line vtyポート設定の終了。

OnirSwitch(config)#exit
特権EXECモード#に移行。

OnirSwitch#exit
ユーザーEXECモード>に移行。

OnirSwitch>exit
コンソール(Tera Term)接続の終了。

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください