Community discussions

 
ksswd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Feb 17, 2005 4:26 pm
Location: Poland

plink and mikrotik

Mon Nov 07, 2005 4:36 pm

Is it possible to execute mikrotik command with plink ?
I can log to mikrotik using plink :

plink.exe -l user -pw password 10.10.10.1

Then I have a normal ssh session open.
But when I try to execute command ie

plink.exe -l user -pw password 10.10.10.1 /interface print

mikrotik says "login failure for user admin ..."

Why is that ? Any ideas ?

OS is 2.9.6
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Tue Nov 08, 2005 10:14 am

AFAIK, no inline command execution is possible. Use expect.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
ksswd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Feb 17, 2005 4:26 pm
Location: Poland

Tue Nov 08, 2005 10:36 am

But is Expect available for Windows? I use ActivePerl and Expect is not compatible with that.
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Tue Nov 08, 2005 10:59 am

According to this post (http://www.wellho.net/forum/The-Tcl-pro ... ndows.html), Expect is available for Windows too and it is perfectly compatible with Perl.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Tue Nov 08, 2005 11:53 am

Inline execution works, mea culpa.
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.
 
ksswd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Feb 17, 2005 4:26 pm
Location: Poland

Tue Nov 08, 2005 12:10 pm

How does inline execution work ? How should I enter the command to work ?

P.S.

Still don't konw how can I use Expect with perl if it comes for Tcl language (Activetcl Expect)
 
miroxy
just joined
Posts: 23
Joined: Tue Mar 22, 2005 12:02 am
Location: Serbia
Contact:

Mon Jan 09, 2006 6:03 am

Inline execution works in case that you are using "print", anything else don't
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Thu Feb 02, 2006 11:50 am

wrong:
eugene@nx8220:/tmp$ ssh -l admin 10.0.11.12 "/ip fire filter add chain forward;/ip fire filter print"
Flags: X - disabled, I - invalid, D - dynamic
 0   chain=for action=accept

eugene@nx8220:/tmp$
Tout individu a droit à la vie, à la liberté et à la sûreté de sa personne.

Who is online

Users browsing this forum: No registered users and 2 guests