× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Evan. -batch took care of the "press Return... " prompt.

Still dealing with:
rksh: ERRLOG: not found.

I discovered that entering anything other than all lowercase in the
terminal causes the same "not found" error. So I changed my
ErrlogCommands.txt file so that "ERRLOG" is now "errlog". But I'm still
getting the error:
rksh: errlog: not found.

- Dan

On Tue, Mar 12, 2024 at 7:57 AM Evan Harris <auctionitis@xxxxxxxxx> wrote:

try the -batch keyword on plink to get past the "press Return... " prompt

-batch disable all interactive prompts
https://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html


On Tue, Mar 12, 2024 at 6:07 PM Dan <dan27649@xxxxxxxxx> wrote:

I am brand new to PuTTY. I am trying to automate retrieving ERRLOG data
via
batch. FWIW, I installed “Simon Tatham Putty .76” on Windows 10 and am
using the Windows command line. Here’s where I’m at so far:



putty.exe -ssh user@SERVER -pw TheActualPassword

^ This brings up the terminal with the user successfully logged in:

Using username "user".

Last unsuccessful login: Tue Dec 26 11:26:13 EST 2023 on ssh from
111.15.171.117

Last login: Mon Mar 11 23:23:59 EDT 2024 on ssh from 111.15.171.117

$



I type in ERRLOG, press Enter, get:

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION

60D73419 0305122424 I S vnicserver0 VNIC Client Login

<and several more lines>

$



I reviewed the documentation and discover command line options, such as
-m,
which tells PuTTY to “read a remote command or script from a file”. I
created a test file named ErrlogCommands.txt, and there is one line:

ERRLOG



Now, I try:

putty.exe -ssh user@SERVER -pw TheActualPassword -m ErrlogCommands.txt



The terminal literally flashes on and then off. It took me several
tries,
but I was able to capture it before it disappeared:

Using username “user”

rksh: ERRLOG: not found.



I also tried:

putty.exe -ssh user@SERVER -pw TheActualPassword -m ErrlogCommands.txt >
a.txt

but this simply created an empty file named a.txt.



PLINK looked interesting, so I tried

PLINK.exe -ssh user@SERVER -pw TheActualPassword -m ErrlogCommands.txt

No terminal popped up, but the command line had this response:

Access granted. Press Return to begin session. (I pressed Enter here,
then
got:)

rksh: ERRLOG: not found.



What am I missing? Does the ErrlogCommands.txt file require control
characters of some sort?



- Dan

Regards
Evan Harris



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.