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 linuxtechi@ 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 linuxtechi@ uname; uname
    $ ssh linuxtechi@ hostame; hostame

    a correct example would be :
    $ ssh linuxtechi@ “uname; hostname; date”

Leave a Reply

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