-2
IP 주소를 ping하고 ssh 섹션에 로그인 할 수있는 작은 프로그램을 만들려고합니다.Windows 양식으로 프로그램을 계속 실행하십시오.
나는 그 중 하나를 닫지 않고 핑 (ping) 변경 가능한 IP 주소를 유지할 수 있기를 원합니다.
ssh 섹션에서도 동일한 작업을 수행하고 싶습니다. 지금은 cmd를 종료하고 다른 주소로 ping을해야합니다.
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim ip As String = TextBox1.Text
Dim Command As String
Command = "putty.exe" & " " & "-ssh" & " " & "user" & "@" & ip & " " & "port" & " " & "-pw" & " " & "Password"
Shell($"cmd /K{Command}", 1, True)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim textvar As String = TextBox2.Text
Dim Command As String
Command = "Ping" & " " & textvar & " " & "-t "
Shell("cmd /k" & Command, 1, True)
End Sub
End Class
[** Ping it yourself? **] (https://stackoverflow.com/a/40820084/3740093) –