Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

History of commands / Syslog

Hello,

I am using router 1812

1) How can I find what commands have been entered on a router?

2) How can I log all these commands to a file / syslog?

3) How can I find, let's say, the last 10 login attempts?

thank u

2 ACCEPTED SOLUTIONS

Accepted Solutions
ata
New Member

Re: History of commands / Syslog

Hi,

1.)Enter the command show history

2.)configure logging x.x.x.x where x= IP-Addr. of your file / or syslog server

3.)configure logging userinfo, where the user has than to change his Login from disable to enable Modus.

Re: History of commands / Syslog

Consider the following:

To enable logging of user information, and the counting of various types of syslog messages:

logging count

logging userinfo

Note: Use "show logging count" to derive benefit of "logging count".

To regulate and log user logins (failed and successful):

login block-for 120 attempts 4 within 120

login on-failure log

login on-success log

To log configuration changes via syslog:

archive

log config

logging enable

notify syslog

hidekeys

Edit: For some reason the post is displayed differently than I pasted it. The four commands under "archive" are sub commands and should be shown as indented.

logging origin-id hostname

logging source-interface

logging

3 REPLIES
ata
New Member

Re: History of commands / Syslog

Hi,

1.)Enter the command show history

2.)configure logging x.x.x.x where x= IP-Addr. of your file / or syslog server

3.)configure logging userinfo, where the user has than to change his Login from disable to enable Modus.

New Member

Re: History of commands / Syslog

boath answers helped me a lot...

I have another question...

sh history - shows me the commands entered, but if I logout and then login , history is empty; can I do something about that, like in linux, the history file keeps your commnads there even if u do a relogin. I hope u understand what I want to say.

thanku again

Re: History of commands / Syslog

Consider the following:

To enable logging of user information, and the counting of various types of syslog messages:

logging count

logging userinfo

Note: Use "show logging count" to derive benefit of "logging count".

To regulate and log user logins (failed and successful):

login block-for 120 attempts 4 within 120

login on-failure log

login on-success log

To log configuration changes via syslog:

archive

log config

logging enable

notify syslog

hidekeys

Edit: For some reason the post is displayed differently than I pasted it. The four commands under "archive" are sub commands and should be shown as indented.

logging origin-id hostname

logging source-interface

logging

127
Views
0
Helpful
3
Replies