Louis-Alex Louis-Alex - 1 month ago 9
Linux Question

Is there a way to get a list of installed printers on a linux server from VB?

Is there a way to deal with a CUPS server from a program written in VBNet ?

From VBNet, I'd like to get a list of all installed printers on a linux server (a VM actually) and maybe execute some function (as cupsenable, cupsdisable, cancel, etc.) on one ...

Is there a kinda framework I could use ?...

Answer

From the NuGet package manager, find and add SSH.NET to your project.

This should allow you to SSH the server and issue commands like follows:

Using ssh As New SshClient("server_host_name", "server_user_name", "server_password")
    ssh.Connect()
    Dim result = ssh.RunCommand("ls -l")  'list directory info
    ssh.Disconnect()
End Using

Project's Homepage

Example provided here