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

时间:2016-10-20 13:21:14

标签: linux vb.net printing cups

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 ?...

1 个答案:

答案 0 :(得分:0)

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