Archived Forum Post

Index of archived forum posts

Question:

SSH run multiple commands

Apr 15 '13 at 09:09

I have a question, can you better explain this

' Execute a sequence of commands. The syntax for CMD.EXE may be found

' here: http://technet.microsoft.com/en-us/library/bb490880.aspx. Notice how the commands

' are separated by "&&" and the entire command must be enclosed in quotes:

Dim cmd4 As String

cmd4 = """cd \temp&&dir"""

I see this can send more than one command at once. what im looking to do is send a command read the output of the text and find certain strings and if the certain string meets what im looking for will determine what other command i need to send. can the above work for what im looking to do? or does that send one command and then the next?

thank you Brock


Answer

Here are examples:

C++: SSH Remote Shell Multiple Commands

Unicode C++: SSH Remote Shell Multiple Commands

Objective-C: SSH Remote Shell Multiple Commands

MFC: SSH Remote Shell Multiple Commands

C: SSH Remote Shell Multiple Commands

Unicode C: SSH Remote Shell Multiple Commands


Answer

And more of the same example in different programming languages:

ASP: SSH Remote Shell Multiple Commands

SQL Server: SSH Remote Shell Multiple Commands

C#: SSH Remote Shell Multiple Commands

IOS: SSH Remote Shell Multiple Commands

PowerShell: SSH Remote Shell Multiple Commands

Delphi: SSH Remote Shell Multiple Commands

DelphiDll: SSH Remote Shell Multiple Commands

Visual FoxPro: SSH Remote Shell Multiple Commands

Java: SSH Remote Shell Multiple Commands

Androidâ„¢: SSH Remote Shell Multiple Commands

Perl: SSH Remote Shell Multiple Commands

PHP: SSH Remote Shell Multiple Commands

PHP: SSH Remote Shell Multiple Commands

Python: SSH Remote Shell Multiple Commands

Ruby: SSH Remote Shell Multiple Commands

VB.NET: SSH Remote Shell Multiple Commands

Visual Basic: SSH Remote Shell Multiple Commands

VBScript: SSH Remote Shell Multiple Commands