How to Execute Linux Commands on Remote System over SSH

You may also like...

3 Responses


    Awesome share

  2. yazul says:

    3rd example is wrong :
    $ ssh [email protected] uname; hostname; date

    commands “hostname” and “date” excute locally and not thru ssh tunnel !!!
    (local sh split command line on “;” and execute each of them.

    you can test :
    $ ssh [email protected] uname; uname
    $ ssh [email protected] hostame; hostame

    a correct example would be :
    $ ssh [email protected] “uname; hostname; date”

Leave a Reply

Your email address will not be published. Required fields are marked *