Having issue with the SSH output in Excel VBA with Windows.
I had tried to run the same thing using SSH and it works fine but when I try to do with VBA, it shows it is working but nothing is displayed.
Sub CreateSSHTunnelUsingPutty()
Dim strFilename As String, strCommandLine As String
Dim strCurrPath As String
Dim lngWindowHandle As Long
Dim strServerPOrt As Long
Dim strServerUser As String
Dim strServerPassword As String
Dim IPAdd As String
Dim rng As Range, cell As Range
strServerPOrt = 22 'Sample POrt
strServerUser = "username" 'Sample User Name
strServerPassword = "password" 'Sample Password
'Set rng = Range("B2:B75")
For Each cell In ActiveSheet.Range("B2:B2")
IPAdd = cell.Value
strFilename = "Plink.exe"
strCommandLine = IPAdd & " -P " & strServerPOrt & " -l " & strServerUser & " -pw " & strServerPassword
'Launch tunnel
Call lbf_ShellExecute(0, "open", strFilename, strCommandLine, "", 1)
'Change the last parameter from a one to a zero and the connection window will be hidden.
Sleep (3000)
'Here i want to give my commands so that output will be displayed on Sheet 1 Starting Row 3
End Sub
Lets say if I put version then it should display the version or top command will result in the all the memory details.