Hello,
i was using PBCL_SysLinuxShell_1 from PLCnextBase 1.4.1
The FB sends a command to reboot a device using SSH:
ssh -i /opt/plcnext/projects/RebootSsh/id_rsa_plcne.priv -o „UserKnownHostsFile=/dev/null“ -o „StrictHostKeyChecking=no“ -o „HostKeyAlgorithms=ssh-rsa“ root@192.168.1.1 reboot
This used to work correctly with FW2021.6 and FW2021.9 but it doesn 't work anymore with FW2022.0.3 and FW2022.0.4.
The output values are:
anyResult ''xDone FALSExError TRUEwDiagCode 16#C331wAddDiagCode 16#0002
that means "Timeout error to the PLCnextBaseServices server ", but I set diTimeout even to 40000 (40 s)
I used also another command:
ssh -i /opt/plcnext/projects/RebootSsh/id_rsa_plcne.priv -o „UserKnownHostsFile=/dev/null“ -o „StrictHostKeyChecking=no“ -o „HostKeyAlgorithms=ssh-rsa“ root@192.168.1.1 -q pwd
that normally would give back as anyResult the value „/root“, but now gives back „OK“, that doesn’t make any sense…
Does anyone know why this happens with new FW?
I found that with FW2022 the OpenSSH release was upgraded from 8.4p1 to 8.8p1
Thanks,
Marcello
P.S.: The private key „id_rsa_plcne.priv“ is the copy of the original key (created by admin), owned by plcnext_firmware :
admin@axcf2152:/opt/plcnext/projects/RebootSsh$ ls -l``-rw-rw---- 1 admin plcnext 2602 Apr 01 11:12 id_rsa.priv``-rw-r--r-- 1 admin plcnext 568 Apr 01 11:12 id_rsa.pub``-rw------- 1 plcnext_firmware plcnext 2602 Apr 01 12:18 id_rsa_plcne.priv