garbage charters in output (General questions)
I am doing this from vb6 module not a form. How do I get rid of this garbage in the output. Thanks,
[code]Sub ConnectAndExecute()
Dim sshConnection As New wodTelnetDLXCom
Dim strLogMsg as String
Dim intLastConnectionError as Integer
sshConnection.Timeout = 30 ' number of seconds before the connection gives up
sshConnection.Protocol = 2 ' 1 for telnet 2 for ssh
sshConnection.Blocking = 1 ' we always want 1 that allows us to use a password instead of a ssh key
sshConnection.Port = 22 'Port = 23 for telnet (tms5 ) 22 for ssh (tms6)
sshConnection.HostName = myServer
sshConnection.Login = myUserName
sshConnection.Password = myPassword
On Error Resume Next
sshConnection.Connect
intLastConnectionError = sshConnection.LastError
If intLastConnectionError <> 0 Then
strLogMsg = sshConnection.ErrorText(sshConnection.LastError) & vbCrLf
Else
sshConnection.WaitFor ( regex:[$ #>:] $ )
sshConnection.DataReady = 0
'send the command to execute
strLogMsg = sshConnection.Execute( ls -l /home/ + vbLf, $ , 20)
debug.print strLogMsg
sshConnection.Disconnect
End If
Set sshConnection = Nothing
End Sub
[/code]
[00m total 96684
-rw-r--r-- 1 49424042 Aug 16 12:32 [01;31mData-2010-08-16.sql.gz[00m
-rw-r--r-- 1 49468252 Aug 17 12:32 [01;31mData-2010-08-17.sql.gz[00m
[m[user@myserver ]
Complete thread:
- garbage charters in output - Kevin, 2010-08-17, 23:19
- Re: garbage charters in output - wodDamir, 2010-08-17, 23:25