
08-20-2008, 11:25 AM
|
Re: PuTTY - starting from command line with logging enabled On Wed, 20 Aug 2008 07:56:47 -0700 (PDT), Nomad wrote:
> I am in a 100+ unix server environment, and due to some security
> requirements, instead of using my master administration server as a
> jumpboard, now I have to launch separate sessions to each of these
> servers when I need to login. I am quite sufficient in unix
> environment and do whatever I wish to do but when it comes to windows,
> writing batch files is harder than pulling teeth.
> Now, my requirement is, when I launch an ssh session, I want it to
> start with logging enabled, but I do not want to go and manually
> create 100+ sessions (number expanding weekly, if not daily) and mark
> each session with logging enabled. This is not something feasible for
> me. I read thru the PuTTY manual but did not see any command line
> switch to accomplish this. I need to save my last, say 50, sessions
> screen input and output to any server I go into, on my local machine.
> I was hoping to write a batch file which will accept the server name
> as a command line argument and create a new log file with datestamp
> being part of the filename as well as the server name.
> I thought of using AutoHotKey to send a series of keystrokes to the
> terminal window to open up the context menu (drop down from upper left
> corner) but could not figure out if there is a way to drop it down
> with a key stroke. I tried, many combinations of win-alt-ctrl-shift
> with any alphabetical and numerical keys but was not able to drop down
> the context menu.
> If anyone was able to accomplish this before, I really would like to
> hear how you did it.
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.
See the documentation (especially section 4.2): http://www.chiark.greenend.org.uk/~s...utty/docs.html
--
Dale Dellutri (lose the Q's) |