View Single Post

  #5  
Old 08-21-2008, 07:18 AM
Default Re: PuTTY - starting from command line with logging enabled

On Wed, 20 Aug 2008 10:30:13 -0700 (PDT), Nomad wrote:
> On Aug 20, 8:25?am, Dale Dellutri wrote:


> > You don't use command line switches. ?You set up a named session,
> > for example, toUnixServer, then set all the options you want for
> > that session including logging (see Session, Logging), then load
> > it at PuTTY startup:
> > ? putty -load "toUnixServer"
> >
> > The log file can be customized to include hostname, date and time.


> This is the very thing that I am trying to avoid. Today I have 100+
> servers tomorrow it will be 120 next year it will be god knows how
> many. Trying to keep track of them by this manually creating session
> files, is not something I want to do continuously. This is the thing
> that I am trying to circumvent if you read my original message.
> Otherwise I know the existence of this option. It just is not feasible
> for me to employ.


Then do it this way:

1. Modify the Default session to include logging with a
file name like unixserver-&H-&Y&M&D&T.log in whatever
directory you choose. The H will be filled in with
the hostname, YMDT with the year, month date time.
Save the Default session

2. In your batch file, start putty like:
putty.exe -ssh %user%@%host%
(I think that's the right DOS syntax)
where %user% and %host% will be filled in as you
described.

This will use the Default session which you already
modified to include logging.

All of this is described in the documentation at:
http://www.chiark.greenend.org.uk/~s...utty/docs.html

--
Dale Dellutri (lose the Q's)
Reply With Quote