Execute SSH command fails after update server

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
nicsergio
Posts: 15
Joined: 19 Aug 2014 07:58

Execute SSH command fails after update server

Post by nicsergio » 23 Apr 2020 06:25

Good morning,

I have been using the "Execute SSH Command" action for some time, without problems, either by sending commands to my Raspberry or to the NAS.
Yesterday I updated the NAS firmware (Xigmanas, ex Nas4free) to the latest version V10.1.0.4.7542 and I could no longer access via SSH from my pc with WinScp.
Before regenerating keys and trying other changes, I simply updated WinScp and magically everything went back to work.

I then realized that Automagic is also no longer able to send commands, returning the "Algorithm negotiation fail" error, related to the JSch library.

Below the flow log:

Code: Select all

22.04.2020 22:35:53.741 [Spegnimento NAS] Starting to execute flow 'Spegnimento NAS' with Context{global{global_EventContactNumber=+393392995555,global_NasCheckCount=0},local{flow_name=Spegnimento NAS,trigger=Manual,triggertime=1587587753734}}
22.04.2020 22:35:53.742 [Spegnimento NAS] Start executing action 'Execute SSH Command: ssh://Htpc@192.168.0.10:22 shutdown -p now'
22.04.2020 22:35:53.869 [Spegnimento NAS] Action 'Execute SSH Command: ssh://Htpc@192.168.0.10:22 shutdown -p now' Could not execute command 
ch.gridvision.ppam.androidautomagiclib.util.m: Algorithm negotiation fail
	at ch.gridvision.ppam.androidautomagic.model.a.ap$1.b(SourceFile:421)
	at ch.gridvision.ppam.androidautomagiclib.util.ci$1$1.run(SourceFile:52)
	at android.os.Handler.handleCallback(Handler.java:794)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:176)
	at android.app.ActivityThread.main(ActivityThread.java:6651)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
	at com.jcraft.jsch.Session.receive_kexinit(SourceFile:583)
	at com.jcraft.jsch.Session.connect(SourceFile:320)
	at com.jcraft.jsch.Session.connect(SourceFile:183)
	at ch.gridvision.ppam.androidautomagic.model.a.ap$1.a(SourceFile:262)
	at ch.gridvision.ppam.androidautomagic.model.a.ap$1.c(SourceFile:200)
	at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
	at java.lang.Thread.run(Thread.java:764)

22.04.2020 22:35:53.870 [Spegnimento NAS] End executing action 'Execute SSH Command: ssh://Htpc@192.168.0.10:22 shutdown -p now' and exception Algorithm negotiation fail
22.04.2020 22:35:53.870 [Spegnimento NAS] Flow continues executing with the next step.
22.04.2020 22:35:53.871 [Spegnimento NAS] Start executing action 'Notification on Statusbar: Invio comando fallito Thumb Down ID 2'
22.04.2020 22:35:53.927 [Spegnimento NAS] End executing action 'Notification on Statusbar: Invio comando fallito Thumb Down ID 2'
22.04.2020 22:35:53.928 [Spegnimento NAS] Flow ended.

Would you be able to insert any changes in the next release to solve the problem?

thank you
Sergio

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Execute SSH command fails after update server

Post by Desmanto » 27 Apr 2020 17:54

It seems the NAS updated with new algorithm and doesn't accept previous one. I don't know much about the NAS, but maybe you can try to sudo to the NAS and do some command
https://stackoverflow.com/questions/626 ... ation-fail
Answer from mrmuggles
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
nicsergio
Posts: 15
Joined: 19 Aug 2014 07:58

Re: Execute SSH command fails after update server

Post by nicsergio » 27 Apr 2020 19:32

many many thanks

I modified sshd_config and now works :mrgreen:

Post Reply