Looking for an example of how to do ssh connect and some commands to embedded device

I am looking for an example of how to do ssh connect and some commands to embedded device (totally unrelated to swipl as such).

In Python we have paramiko is there a similar library for swipl ?

Also would like to have pexpect like library… Purpose would be to control embedded devices with ssh/telnet connections from a swipl script.

1 Like

See libssh pack. It currently only does the server side though. The client side is most likely simpler to do. Maybe an exercise :slight_smile: ? Seems you are looking for the client side? You can of course use library(process) and connect stdin and stdout from an ssh process.

I don’t think there is a ready to run pexpect alternative. Shouldn’t be very hard to write something like that in directly in Prolog and using DCGs it might even look pretty and be scalable.