Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    ssh /dev/null question

    Hi there,

    I want to run some commands via SSH, but I don't care about the (stdio) output of the commands.

    I'm wondering if I do:

    ssh -l <user> <host> <command> >/dev/null

    where is the output killed - is it propagated back to my machine, then dumped?
    Or is it dumped at the remote host?

    I'd prefer the latter, but not sure if this is the case.


    ps sorry if this is the wrong forum

  2. #2
    Linux User
    Join Date
    May 2008
    NYC, moved from KS & MO
    The output will be local. To test, change /dev/null to /tmp/ssh_output_test and you'll find ssh_output_test on your localhost machine instead of remote host.

    To output error to remote host, you probably need to instruct <command> to output to /dev/null on the remote machine, that is, the redirect becomes part of the <command>.

Posting Permissions

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