run script over ssh without displaying the command
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2018
    Location
    UK
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    run script over ssh without displaying the command

    I'm using an ssh command to connect to a remote server and running a local script.

    Code:
    ssh SERVER bash < script.sh

    The script executes fine but is there away to stop the command displaying on the screen?

    Code:
    user@server:~$ COMMAND FROM SCRIPT.SH <--------------- Line I would like to remove.
    command output

    So I would run the command and only see the output:

    Code:
    command output

  2. #2
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    1,014
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: run script over ssh without displaying the command

    Could you post your script.sh? Simply doing a "ssh <server> bash < script.sh" should't cause this issue unless you include a "-x" after the bash. Posting the output of "ssh <server> env" might help as well.

Similar Threads

  1. How to run sudo command in the script?
    By borispr in forum Using Fedora
    Replies: 2
    Last Post: 4th July 2012, 03:24 PM
  2. displaying a notification from script
    By pobbz in forum Using Fedora
    Replies: 2
    Last Post: 9th December 2007, 12:20 PM
  3. Replies: 2
    Last Post: 5th November 2005, 07:25 PM
  4. Using mail command in script
    By cdlaforc in forum Using Fedora
    Replies: 1
    Last Post: 22nd September 2005, 03:38 AM
  5. Shutdown Command Script
    By ontguy in forum Using Fedora
    Replies: 5
    Last Post: 26th May 2004, 07:38 PM

Posting Permissions

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