On Feb 20, 2008, at 12:56 PM, marco wrote:

> I wonder how to get ssh credentials from the gui. I successfully read
> them through the command line using the function "prompt()"
> Now I am going crazy to get it work over the Nessus client GUI.

Have you looked in the nessusd.messages log for any errors or to make  
sure the plugin is actually being loaded and run?

What exactly is not working?

> This
> is the code I used:
>
> login = port = get_kb_item("Secret/SSH/login");

Are port and login really the same?

> password=get_kb_item("Secret/SSH/password");
> sock=ssh_login(socket:ssh_soc, login:login, password:password);

ssh_login() doesn't return a socket but rather -1 or 0. Look at   
ssh_login_or_reuse_connection() instead.

> buf = ssh_cmd(socket:ssh_soc, cmd:"file", timeout:60);


You haven't included enough code to determine what's going on. For  
example, I don't see an include for ssh_func.inc, how you create  
ssh_soc, what script category you've selected, etc.

George
-- 
[EMAIL PROTECTED]

_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus

Reply via email to