Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Script to pipe SSH output to a text file

$
0
0

Hi,

I work for an ISP and we often have to look up data on a customer's cable modem. To do this we create a session to the CMTS using SSH (via Putty) and run specific commands to return pieces of data.  What I would like to do is create a script to :

  • Run an instance of Putty an open a SSH session.
  • Provide username and password (as parameters) to begin the session.
  • Run commands using variable parameters.
  • Display the outputs on screen and pipe the resulting output to a text file (if needed)
  • Also, would like to append multiple outputs ( from the same session) to the same text file.

Any assistance with this will be greatly appreciated.

Thanks


Chris W.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>