|
On Mar 12, 2024, at 9:10 AM, Dan <dan27649@xxxxxxxxx> wrote:
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 datavia
batch. FWIW, I installed “Simon Tatham Putty .76” on Windows 10 and am-m,
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
which tells PuTTY to “read a remote command or script from a file”. Itries,
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
but I was able to capture it before it disappeared:then
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,
got:)
rksh: ERRLOG: not found.
What am I missing? Does the ErrlogCommands.txt file require control
characters of some sort?
- Dan
Regards
Evan Harris
This is the PC Technical Discussion for IBM i (AS/400 and iSeries) Users (PcTech) mailing list
To post a message email: PcTech@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/pctech
or email: PcTech-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/pctech.
As an Amazon Associate we earn from qualifying purchases.
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.