Scripting SSH connections

From: Simon Burson (Simon.Burson_at_telecom.co.nz)
Date: 05/17/04

  • Next message: M. Fioretti: "Re: ssh works through ppp0, not through ADSL router"
    Date: Mon, 17 May 2004 11:58:59 +1200
    To: secureshell@securityfocus.com
    
    

    I would like to write a basic shell script (Linux - bash) that will make
    an SSH connection to another machine, execute arbitrary commands, read
    back the output and log off gracefully. I can pipe commands to ssh but
    of course this isn't interactive and so decisions can't be made based on
    output.

    Does anyone know of a method/package where this can be done with ssh.
    Basically looking for a netcat type thing that supports SSH.

    Cheers.

    -Simon

    ------------------------------------------------------------------------------
    "This communication, including any attachments, is confidential.
    If you are not the intended recipient, you should not read
    it - please contact me immediately, destroy it, and do not
    copy or use any part of this communication or disclose
    anything about it. Thank you. Please note that this
    communication does not designate an information system for
     the purposes of the Electronic Transactions Act 2002."
    ------------------------------------------------------------------------------


  • Next message: M. Fioretti: "Re: ssh works through ppp0, not through ADSL router"