access ssh.Users - WeOnlyDo Discussion board

access ssh.Users (wodSSH / wodSSH.NET)

by Michael, Monday, February 08, 2010, 10:21 (5162 days ago)

Hi!

I tried to access the ssh.Users collection, but it fails.
Here my code:

[code]for (int i = 0; i < ssh.Users.Count; i++)
{
wodSSHDComLIB.SSHUser u = ssh.Users(0);
active_users = active_users + + u.Login;
}[/code]

VisualStudio tells me that Users cannot be accessed.
What am I doing wrong?

Greets,

Michael

Re: access ssh.Users

by woddrazen, Monday, February 08, 2010, 11:52 (5162 days ago) @ Michael

Hi Michael,


Can you please try something like this it works for me
[code] for (short i = 0; i < ssh.Users.Count; i++)
{
Console.WriteLine(ssh.Users.Login);
}[/code]

Let us know how it goes.


Regards,
Drazen

Re: access ssh.Users

by Michael, Tuesday, February 09, 2010, 20:45 (5161 days ago) @ woddrazen

Hi,

this works.
But SSHUser user = ssh.Users does not work.
But so its fine anyway.

Greets,

Michael

[quote]Hi Michael,


Can you please try something like this it works for me
[code] for (short i = 0; i < ssh.Users.Count; i++)
{
Console.WriteLine(ssh.Users.Login);
}[/code]

Let us know how it goes.


Regards,
Drazen[/quote]