Putty

Putty may be a broadly utilized, free, apparatus to SSH/Telnet/Console/etc into a arrange gadget. I can’t review how numerous times I’ve burned myself because I fat-fingered the console and after that misplaced my association to the network device or misconfigured an interface and not realize it for one or two of days. Or what in the event that you needed to keep in mind what you did a handful of months back on a switch?

Then on the left pane, click on Logging under Session.

Under the Session Logging section, select “All session output”
For the log file name, use this structure: &H-&Y&M&D-&T.log

&H – This will append the hostname of the device to the front of the file.

&Y&M&D – This adds the year, month, and day.

&T – This adds the time you logged into the device.

Click on browse to save it to a specific location. Log file will then look like: 192.168.1.1-20131024-075505.log

Go back to the Session window, click on Default Settings, and click Save. So next time you open Putty or create a new saved session, it will create the log file.

Let’s see it in action. I’m going to create a new saved session for the ATT Looking Glass route server:

Let’s take a look at Google‘s BGP routes

Here is the contents of that log:

----------- PuTTY log 2013.10.24 07:58:42 --------------
---- route-server.ip.att.net ----


The information available through route-server.ip.att.net is offered
by AT&T's Internet engineering organization to the Internet community.

This router maintains eBGP peerings with customer-facing routers
throughout the AT&T IP Services Backbone:

IPv4:
12.123.21.243  Atlanta   12.123.133.124 Austin    12.123.41.250  Cambridge
12.123.5.240   Chicago   12.123.17.244  Dallas    12.123.139.124 Detroit
12.122.83.238  Denver    12.123.134.124 Houston   12.123.29.249  LA

IPv6:
2001:1890:FF:FFFF:12:122:120:7    Fort Lauderdale
2001:1890:FF:FFFF:12:122:125:6    Los Angeles
2001:1890:FF:FFFF:12:122:125:44   New York

#### Log in with username 'rviews', password 'rviews' #####

route-server.ip.att.net (ttyp5)

login: rviews
Password: rviews

--- JUNOS 12.1R3-S4 built 2013-03-24 11:22:31 UTC 
rviews@route-server.ip.att.net> show route www.google.com 

inet.0: 462505 destinations, 6937311 routes (462505 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

173.194.78.0/24    *[BGP/170] 3w2d 17:29:34, localpref 100, from 12.122.125.224
                      AS path: 7018 15169 I
                    > to 12.0.1.1 via em0.0
                    [BGP/170] 2w3d 09:11:13, localpref 100, from 12.122.83.238
                      AS path: 7018 15169 I
                    > to 12.0.1.1 via em0.0

rviews@route-server.ip.att.net> exit

About Author

1 thought on “Saving Putty Sessions To A Log File

Comments are closed.