Results 1 to 7 of 7

Thread: Hi all

  1. #1
    Join Date
    Oct 2012
    Posts
    9

    Post Unanswered: Hi all

    I want to execute shell script with in sftp session for remote server.

    like i have a shell script test.sh that is on local server.i want to execute lile

    sftp user@192.168.56.10
    sftp> test.sh ---execute for remote server not for local server.

    Please help me for this issue

  2. #2
    Join Date
    Oct 2012
    Posts
    9

    want to execute shell script with in sftp session for remote server. like i have a s

    want to execute shell script with in sftp session for remote server.

    like i have a shell script test.sh that is on local server.i want to execute lile

    sftp user@192.168.56.10
    sftp> test.sh ---execute for remote server not for local server.

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    please do not create another post on the same matter
    if you feel your question hasn't had a response in a reasonable time then consider that either its not phrased or titled especially clearly
    OR
    There is insufficient information in the query

    If you think that the post may have been missed and you feel its appropriate you can bump a post by replying to it (often posting '***BUMP***' or similar) to push it towards the top of the list. However you do have to give it some time before you do that,m and trusdt me 22 minutes is nowhere near enough
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    You need to use ssh to run command on remote host, a couple of examples:
    Code:
    ssh user@192.168.56.10 head -25 /path/to/file/file.txt
    ssh user@192.168.56.10 'cd /path/to/dir/; find . ! -name . -prune -type f -mtime 90'

    So try:
    Code:
    ssh user@192.168.56.10 /path/to/file/test.sh

  5. #5
    Join Date
    Oct 2012
    Posts
    9

    ssh user@192.168.56.10 /path/to/file/test.sh

    i want to keep test.sh on local server and then run on that script on remote server .will that scripts run on remote server.
    /path/to/file/test.sh

  6. #6
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    No, The script has to be on remote server to run on remote server, but you can run individual commands on remote server via ssh.

  7. #7
    Join Date
    Oct 2012
    Posts
    9

    thanks

    thanks to all

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •