sshtest
来源:互联网 发布:软件设计师 报名时间 编辑:程序博客网 时间:2024/06/05 08:43
Imports Tamir.SharpSsh
Module Module1
Sub Main()
Dim ssh_test As New Tamir.SharpSsh.SshShell("192.168.1.102", "genghua", "genghua")
'ssh_test.RedirectToConsole()
Threading.Thread.Sleep(500)
Console.WriteLine("connecting...")
ssh_test.Connect()
Console.WriteLine("ok")
ssh_test.WriteLine("d:")
Threading.Thread.Sleep(500)
ssh_test.WriteLine("1.bat")
Threading.Thread.Sleep(500)
Console.WriteLine("execute command")
Console.WriteLine("please wait")
While (Not My.Computer.FileSystem.FileExists("d:/1.txt"))
Console.WriteLine(".")
End While
ssh_test.Close()
Console.WriteLine("closed")
End Sub
End Module