aMule Forum

English => en_Bugs => Topic started by: netbsd8 on February 02, 2010, 06:48:44 AM

Title: ssh and amulecmd
Post by: netbsd8 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!
Title: Re: ssh and amulecmd
Post by: Vollstrecker 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.
Title: Re: ssh and amulecmd
Post by: netbsd8 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.
Title: Re: ssh and amulecmd
Post by: GonoszTopi 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.
Title: Re: ssh and amulecmd
Post by: netbsd8 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.
Title: Re: ssh and amulecmd
Post by: kweldulf 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'
Title: Re: ssh and amulecmd
Post by: netbsd8 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'
Title: Re: ssh and amulecmd
Post by: GonoszTopi 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.)