Re: Recieve problem - WeOnlyDo Discussion board

Re: Recieve problem (General questions)

by Maverick2004, Friday, February 18, 2005, 13:49 (7029 days ago) @ wodSupport

That did the trick! Thanks! =)

Another question, if i may ask this in the same post.
When my app launches, the user has to enter username
and password. These are later in the app used to connect
to the host and run the commands. How can i check that the
username and passwords are correct when the user enters them?
I need some form of code that just connects/disconnects to
check the username/password, and if it cannot connect with the supplied credentilas, provide an msgbox. I´ve tried using the
below code, but it doesn´t seem to fire, even if i enter the
wrong username/password?
[code]
With wodSSH1
.HostName = server
.Login = user
.Password = psw
.Port = 22
.Protocol = SSHAuto
.Connect
End With

Private Sub wodSSH1_Connected(ByVal ErrorCode As Integer, ByVal ErrorText As String)
If ErrorCode > 0 Then
MsgBox Error & ErrorCode & has occured: & ErrorText, vbCritical, Connection error
Screen.MousePointer = vbDefault
Exit Sub
Else
wodSSH1.Disconnect
End If
End Sub
[/code]


Complete thread: