Friday, June 26, 2015

How to obtain output in a text file on Linux machine for commands executed on remote host over SSH?

How to obtain output in a text file on Linux machine locally for commands executed on remote host over SSH ?



  • For example I SSH a remote host: ssh admin@10.0.0.1

  • Provide Password: admin@IP 10.0.0.1's password: xxxx

  • Now I give command to get the logs: show eventlog


Now I want to capture and save the output of this command in a text file and store that file on my local Linux machine manually or through a script.
Also if I want to get the output from multiple devices what should be the process ?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...