aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: ssh and amulecmd  (Read 4221 times)

netbsd8

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 23
ssh and amulecmd
« on: February 02, 2010, 06:48:44 AM »

When I use ssh to run amulecmd, for example;

ssh username@host /home/username/amule/amulecmd -c "show dl"

I get the error message "Unexpected parameter 'dl'"

Any solution? Thanks in advance!
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: ssh and amulecmd
« Reply #1 on: February 02, 2010, 08:17:03 AM »

The command has to be the last arg to ssh, and -c is an option of ssh, too.

ssh user@host 'amulecmd -c "show dk"' should work.
Logged
Homefucking is killing prostitution

netbsd8

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 23
Re: ssh and amulecmd
« Reply #2 on: February 02, 2010, 07:50:19 PM »

Thanks!

But when I want to add a search result for download,  it still say invalid parameter:

ssh user@host 'amulecmd -c "download 0"'

Without using ssh, the command works fine.

Is it because the search result dispears after finishing last "amulecmd -c" command?

Any solution?

Thanks again!


The command has to be the last arg to ssh, and -c is an option of ssh, too.

ssh user@host 'amulecmd -c "show dk"' should work.
« Last Edit: February 02, 2010, 07:56:42 PM by netbsd8 »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: ssh and amulecmd
« Reply #3 on: February 02, 2010, 11:28:10 PM »

Without using ssh, the command works fine.
I doubt.

Is it because the search result dispears after finishing last "amulecmd -c" command?
Yes.
Logged
concordia cum veritate

netbsd8

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 23
Re: ssh and amulecmd
« Reply #4 on: February 03, 2010, 12:10:12 AM »

I login on the machine, and directly use amulecmd -c "download 0", then I can download the file without any problem.
Without using ssh, the command works fine.
I doubt.

However, the search result is still there, if use the command:
ssh username@host 'amulecmd -c "results"'
Is it because the search result dispears after finishing last "amulecmd -c" command?
Yes.

By the way, the other commands use ssh work fine, such as:
ssh username@host 'amulecmd -c "show dl"'
So, I just doubt there is some problem for the argument 0.

Thanks.
Logged

kweldulf

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: ssh and amulecmd
« Reply #5 on: February 03, 2010, 07:18:04 PM »

I think what GonoszTopi was trying to tell you -- in not quite as many words -- is:
amulecmd starts with an empty results buffer. You just need to query the results before picking your download, meaning that your ssh call must execute both commands in sequence, i.e. ssh host 'echo -e "results\ndownload 0" | amulecmd'
Logged

netbsd8

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 23
Re: ssh and amulecmd
« Reply #6 on: February 03, 2010, 10:42:01 PM »

It works! Thanks alot.
I think what GonoszTopi was trying to tell you -- in not quite as many words -- is:
amulecmd starts with an empty results buffer. You just need to query the results before picking your download, meaning that your ssh call must execute both commands in sequence, i.e. ssh host 'echo -e "results\ndownload 0" | amulecmd'
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: ssh and amulecmd
« Reply #7 on: February 04, 2010, 05:47:04 PM »

I think what GonoszTopi was trying to tell you -- in not quite as many words --

Wow, now I have people to talk for me! I like it 8)

(Btw: exactly, that's what I meant.)
Logged
concordia cum veritate