Below is my code where I am able to login into linux server using Macro successfully and execute the file from path C:\Users\nt186017\Desktop\space_details.sh. But output file is generated on linux server. How to fetch details from linux server to remote machine using Excel Macro.
Private Sub CommandButton_Click()
Dim UserName 'assign user name
Dim Passwrd 'assign password
Dim TaskID As Long
UserName = "nilesh_t"
Passwrd = "nilesh_t"
pc1 = """C:\Program Files\PuTTY\putty.exe"" -ssh "& _
UserName & "@10.5.1.66 -pw "& Passwrd & " -m ""C:\Users\nt186017\Desktop\space_details.sh"""
TaskID = Shell(pc1, 1)
End Sub