Plink %Access is Denied when asking for password (automa

April 9, 2015 at 05:10:09
Specs: Windows 7
HI,
I am creating a windows batch script where it uses plink to login to the cisco switch, pass a few commands and exit however I am running into a few problems.

The script is as follows:

C://Temp/Plink -ssh 192.168.1.1 -l admin -l class < ShutdownAuthConfig.txt

ShutdownAuthConfig CONTAINS
"enable
class
config t
int fa0/1
shutdown
exit
exit
exit"

But when running the script it says the following:


C:\Users\TANIA\Desktop>C:/Temp/plink -ssh 192.168.1.1 -l admin -pw class 0<C://
Temp/ShutdownAuthConfig.txt
Using username "admin".
FINAL YEAR PROJECT RUNNING - NO UNAUTHORISED ACCESS!!
S1>enable
Password:
% Access denied

S1>class
Translating "class"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
S1>
S1>config t
^
% Invalid input detected at '^' marker.

S1>
S1>int fa0/1
^
% Invalid input detected at '^' marker.

S1>
S1>shutdown
Translating "shutdown"...domain server (255.255.255.255)

Shows Access Denies at the password bit and won't go further.

Hope anyone can help and thanks in advance.


See More: Plink %Access is Denied when asking for password (automa

Report •


#1
July 14, 2015 at 23:45:30
HI.
I THINK YOU SHOULD USE THIS COMMAND (( CACLS ))IN BATCH FILE TO ADD OR REMOVE ""ACCESS DENIED""

EX: CACLS MYFILE /P %USERNAME%:N / F

P= PERMISSION
N= ACCESS DENIED
F= FULL CONTROLE


Report •
Related Solutions


Ask Question