1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Cisco IOS】ログイン時にバナーを表示してみたり

Last updated at Posted at 2019-02-25

偶然見かけて自宅のCatalystに設定したら楽しいCatalystができたので、備忘録として記録。

IOSのバージョンは15です。

##banner login ^
sshで接続した時にバナーを表示します。
設定例はこんな感じ。

Usamin-Planet-SW(config)# banner login ^
this is Usamin-Planet-SW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
^

「^」を最後につけないと終わりません。

設定後、sshで接続した時にこんな感じになります。

$ ssh sw
this is Usamin-Planet-SW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Password:

##banner motd ^
ログイン成功時に表示されます。
設定例はこんな感じ

Usamin-Planet-SW(config)# banner motd ^
Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!
^

「^」をお忘れなく。

設定後、ログインに成功するとこんな感じになります。

Password:

Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!

ようこそウサミン星へ

一応複数行いけます。

Usamin-Planet-SW(config)#banner motd ^
Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!
Next stop is Chiba. Door On the right side will open.
Password:
Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!
Next stop is Chiba. Door On the right side will open.

##banner exec ^
こっちもログイン成功時に表示されるものですが、違いがよくわかりません。

設定例はこんな感じ。

Usamin-Planet-SW(config)#banner exec ^
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!

Usausauuuuuuuuusaaaaaaaaaaaaa!!!!!!!!!!uuuuuuuuusamiiiiiiiiiiiin!!!!!!!!!
^

で、sshでアクセスしてからログイン成功するまでは以下のようになります。

$ ssh sw

this is Usamin-Planet-SW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Password:

Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!
Next stop is Chiba. Door On the right side will open.


Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!

Usausauuuuuuuuusaaaaaaaaaaaaa!!!!!!!!!!uuuuuuuuusamiiiiiiiiiiiin!!!!!!!!!

Usamin-Planet-SW>

ちなみにRunning Configで確認すると以下のようになります。

banner exec ^C
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!
Mimimin!!!!Mimimin!!!!uuuuuuuuuuuuuusamiiiiiiiiiiiiiin!!!!!!!!!!!!!!!!!!!

Usausauuuuuuuuusaaaaaaaaaaaaa!!!!!!!!!!uuuuuuuuusamiiiiiiiiiiiin!!!!!!!!!

^C
banner login ^C
this is Usamin-Planet-SW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
^C
banner motd ^C
Welcome to Usamin-Planet Switch!!!!!!!!!!!!!!!!!!!!!!!!
Next stop is Chiba. Door On the right side will open.

^C

「^C」となっており、このままコピペで設定するとCが入ってしまいますので、ご注意を。

面白おかしく誤ログインや誤設定を防ぎましょう。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?