Community discussions

MikroTik App
 
olmi
just joined
Topic Author
Posts: 19
Joined: Thu Apr 26, 2007 3:58 pm

Sending of commands through ssh with MT

Sun Jan 17, 2010 8:56 am

How to put in order a command through ssh from one MT on another?
Here so does not work (to the user it is authorised to come without the password)

/system ssh 192.168.100.126 user=test
:delay 2
:log error TESTERROR
/quit


Thanks.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Sending of commands through ssh with MT

Mon Jan 18, 2010 12:58 pm

ssh 192.168.100.126 -l test ":log error TESTERROR"
or
ssh test@192.168.100.126 ":log error TESTERROR"

I have found it only works from shell on remote computer. ssh in the MT routers will not work with this.
 
olmi
just joined
Topic Author
Posts: 19
Joined: Thu Apr 26, 2007 3:58 pm

Re: Sending of commands through ssh with MT

Mon Jan 18, 2010 9:12 pm

[admin@VPN] > system ssh test@192.168.100.126 ":log error TESTERROR"
expected end of command (line 1 column 33)
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Sending of commands through ssh with MT

Mon Jan 18, 2010 10:08 pm

As he indicated you cannot execute remote commands from the router shell. Its SSH client doesn't support it.

Who is online

Users browsing this forum: No registered users and 9 guests